def get_count(self, query=None):
        """
        Return total number of alerts that meet the query filter.
        """
        query = query or Query()
        return self.get_db().alerts.find(query.where).count()
def get_count ( self , query = None ) : query = query or Query ( ) return self . get_db ( ) . alerts . find ( query . where ) . count ( )
Return total number of alerts that meet the query filter.