See http://api.mongodb.com/python/current/api/pymongo/collection.html#pymongo.collection.Collection.count

def count(self, filter, **kwargs):
        """
        See http://api.mongodb.com/python/current/api/pymongo/collection.html#pymongo.collection.Collection.count
        """
        return mongo_count(self._collection, filter=filter, **kwargs)