Returns the total number of pages available.
194292
public function getPages()
    {
        return (int)ceil((float)$this->provider->count() / (float)$this->pagelength);
    }
1051146
private function calculateTotalPages()
    {
        // With zero items, there is still one page
        if ($this->getTotalItems() === 0) {
            $this->setTotalPages(1);
            return;
        }

        // The total amount of pages is calculated by dividing the total amount of items by the items per page
        $totalPages = ceil($this->getTotalItems() / $this->getLimit());

        $this->setTotalPages((int)$totalPages);
    }
995488
def GetPageInfo(self):
        

        return self.first_tab, self.last_tab, self.first_tab, self.last_tab
304119
public function getTotalPages()
    {
        if (empty($this->totalPages)) {
            $this->totalPages = (int)ceil($this->getCursor()->count()/$this->limit);
        }

        return $this->totalPages;
    }
1351837
public function getPagesWordCount()
    {
        try {
            $strURI = Product::$baseProductUri . "/pdf/" . $this->getFileName() . "/pages/wordCount";

            $signedURI = Utils::sign($strURI);

            $responseStream = Utils::processCommand($signedURI, "GET", "", "");

            $json = json_decode($responseStream);

            return $json->WordsPerPage->List;

        } catch (Exception $e) {
            throw new Exception($e->getMessage());
        }
    }
1285228
private function _currentPage(): int
    {
        $currentPage = Craft::$app->getRequest()->getQueryParam($this->pageParam, 1);

        if (is_numeric($currentPage) && $currentPage > $this->totalPages) {
            $currentPage = $this->totalPages > 0 ? $this->totalPages : 1;
        } else if (!is_numeric($currentPage) || $currentPage < 0) {
            $currentPage = 1;
        }

        return (int)$currentPage;
    }
1009767
def page_size(self) -> int:
        
        page_count = self.page_count
        return self.paginator.max_size + len(f'\nPage {page_count}/{page_count}')
1358839
def all(self):
        
        results = self.data[self.data_type]
        while self.current < self.total:
            self.fetch_next_page()
            results.extend(self.data[self.data_type])
        return results
967119
public function getTotalPages()
    {
        if (!isset($this->pages)) {
            $recordCount = $this->getTotalRecordCount();
            if ($this->max > 0) {
                $this->pages = ceil($recordCount / $this->max);
            } else {
                $this->pages = 0;
            }
        }

        return $this->pages;
    }
1244053
def get_total_result_count(self):
        """"""

        doc = self._request(self._ws_prefix + ".search", True)

        return _extract(doc, "totalResults")
789420
public function getPages()
	{
		return $this->total > $this->limit ? ceil($this->total / $this->limit) : 1;
	}
410314
public Integer getTotalPage() {
        Number i = this.totalRecord / this.pageRecord;
        return this.totalRecord % this.pageRecord == 0 ? i.intValue() : i.intValue() + 1;
    }
124547
def _get_pages(page_size, total_records):
        
        pages = total_records/page_size+bool(total_records%page_size)
        return range(1, pages+1)
313126
def total_pages(key, page_size)
      (Amico.redis.zcard(key) / page_size.to_f).ceil
    end
1317130
def total_form_count(self):
        
        total_forms = super().total_form_count()
        if not self.data and not self.files and self.initial_form_count() > 0:
            total_forms -= self.extra
        return total_forms
69933
def paging
      page = 0
      results = []
      loop do
        page += 1
        current = yield(page)

        results += current

        break if (current || []).count < page_size # no more results
      end

      return results
    end
1122517
public function getAvailablePage ($total_count, $current_page = 1, $limit = PagerUtility::DISP_PER_PAGE, $options = []) {
 		$max_page = PagerUtility::GetMaxPage($total_count, $limit);
 		return ($current_page <= $max_page) ? $current_page : $max_page;
 	}