'Returns the total number of objects, across all pages.'

def _get_count(self):

    if (self._count is None):
        try:
            self._count = self.object_list.count()
        except (AttributeError, TypeError):
            self._count = len(self.object_list)
    return self._count
