code: def return_item_count_on_page(self, page=1, total_items=1):
          
          up_to_page = ((page - 1) * self.page_items)
          #   Number of items up to the page in question
  
          if total_items > up_to_page:
              #   Remove all the items up to the page in question
              #
              count = total_items - up_to_page
  
          if count >= self.page_items:
              # The remaining items are greater than the items per page
              # so the answer is a full page
              return self.page_items
          else:
              #   There are less items than a full page,
              #
              return count
docs: Return the number of items on page.
  
      Args:
          * page = The Page to test for
          * total_items = the total item count
  
      Returns:
          * Integer - Which represents the calculated number of items on page.