          self.count = queryset.count()
          self.request = request
          return queryset[self.offset:self.offset + self.limit]
  
      def get_paginated_response(self, objects):
          return Response(OrderedDict([
              ('count', self.count),
              ('next', self.get_next_link()),
              ('previous', self.get_previous_link()),
              ('results', objects)
 
</s> remove         self.count = queryset.count()
 </s> add         self.count = _get_count(queryset) </s> remove     def get_paginated_response(self, objects):
 </s> add     def get_paginated_response(self, data): </s> remove             ('results', objects)
 </s> add             ('results', data) </s> remove             ('results', objects)
 </s> add             ('results', data)
    def get_paginated_response(self, data):
          self.count = queryset.count()
          self.request = request
          return queryset[self.offset:self.offset + self.limit]
  
    def get_paginated_response(self, data):
          return Response(OrderedDict([
              ('count', self.count),
              ('next', self.get_next_link()),
              ('previous', self.get_previous_link()),
              ('results', objects)
keep keep keep keep replace keep keep keep keep keep
 API tweaks and pagination documentation 
rest_framework/pagination.py