@classmethod
def count(cls, query=None, db=None):
    """Return the number of the documents.

        The wrapper of count() method in pymongo.
        """
    __db = db if db else cls.__db
    return __db[cls.__collection__].count(query)
