Return total number of alerts that meet the query filter.

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()