def _get_count(self):
        "Returns the total number of objects, across all pages."
        if self._count is None:
            try:
                self._count = self.object_list.count()
            except (__HOLE__, TypeError):
                # AttributeError if object_list has no count() method.
                # TypeError if object_list.count() requires arguments
                # (i.e. is of type list).
                self._count = len(self.object_list)
        return self._count
dataset/ETHPy150Open AppScale/appscale/AppServer/lib/django-1.4/django/core/paginator.py/Paginator._get_count