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