All academies
All challenges

Count the catalog

easy+20 XP

Count how many documents are in the products collection.

Sample of shop.products

{
  _id: 1,
  name: "Wireless Mouse",
  category: "electronics",
  price: 29.99,
  stock: 120,
  rating: 4.5,
  tags: [
    "wireless",
    "accessories"
  ]
}
{
  _id: 2,
  name: "Mechanical Keyboard",
  category: "electronics",
  price: 89.99,
  stock: 45,
  rating: 4.8,
  tags: [
    "mechanical",
    "rgb"
  ]
}
{
  _id: 3,
  name: "USB-C Hub",
  category: "electronics",
  price: 39.99,
  stock: 200,
  rating: 4.2,
  tags: [
    "usb",
    "accessories"
  ]
}