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
Performs a COUNT() query using the current filter constraints.
dataset/ETHPy150Open django/django/django/db/models/sql/query.py/Query.get_count