keep document count 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);
});