how to get object count from MongiDB based on provided criteria code example Example: mongo count db.collection.countDocuments( <query>, <options> )