Veja o número de documentos na coleção MongoDB
db.collection.count()
AlbaOpus
db.collection.count()
db.collection.countDocuments( <query>, <options> )
model.estimatedDocumentCount();
db.people.count( { age: { $gt: 30 } } )
db.people.find( { age: { $gt: 30 } } ).count()
-- sql
SELECT COUNT(*)
FROM people
WHERE age > 30