mongodb query find an return total length of a collection code example Example: mongo count db.collection.countDocuments( <query>, <options> )