def get_count(self):
        """
        Returns a count of the total number of objects seen.
        """
        try:
            return self.objects.count()
        except (AttributeError, __HOLE__):
            # If it's not a QuerySet (or it's ilk), fallback to ``len``.
            return len(self.objects)
dataset/ETHPy150Open django-tastypie/django-tastypie/tastypie/paginator.py/Paginator.get_count