count total documents in mongodb with mongoose code example Example: mongoose count model.estimatedDocumentCount();