'Perform a COUNT() query using the current filter constraints.'

def get_count(self, using):

    obj = self.clone()
    obj.add_annotation(Count('*'), alias='__count', is_summary=True)
    number = obj.get_aggregation(using, ['__count'])['__count']
    if (number is None):
        number = 0
    return number
