model.count
Count document(s) in a collection
Arguments
options
(object)
query
(object|id):MongoDB query document
, or id- [
any mongodb option
] (any)
Returns
A promise
Example
await user.count({ query: { name: "Martin Luther" }}) // 4