Вы можете определить переменную _count в своем пагинаторе
paginator = Paginator(QuerySet, 300)
paginator._count = 9000 # or use some query here
А вот часть кода django paginator, чтобы помочь вам понять, что делает эта переменная и как работает счетчик страниц
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 (AttributeError, 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
count = property(_get_count)