mongoose count documents in model code example Example: mongoose count documents await model.countDocuments({ name: 'Florin' })