Dokumenty zliczania Mongoose
await model.countDocuments({ name: 'Florin' })
florinrelea
await model.countDocuments({ name: 'Florin' })
await model.countDocuments({status:1})
db.collection.countDocuments( <query>, <options> )
Adventure.countDocuments({ type: 'jungle' }, function (err, count) {
console.log('there are %d jungle adventures', count);
});
model.estimatedDocumentCount();