document count + 1 mongoose code example
Example 1: mongoose count documents
await model.countDocuments({ name: 'Florin' })
Example 2: countDocuments mongoose
Adventure.countDocuments({ type: 'jungle' }, function (err, count) {
console.log('there are %d jungle adventures', count);
});