Get amount of records per page
@return integer
515982
public function getRows()
    {
        $rows = isset($this->requestParams[self::PARAM_ROWS])
            ? $this->requestParams[self::PARAM_ROWS]
            : self::DEFAULT_ROWS;

        return (integer)$rows;
    }
1021675
public function getData()
    {
        $limit = $this->getLimit();
        $this->setHeaders();
        $page  = $this->getPage();
        if ($page > 0) {
            $page-=1;
        }
        return $this->getDataSource()->limit($limit)->offset($limit * $page)->getAll();
    }
410314
public Integer getTotalPage() {
        Number i = this.totalRecord / this.pageRecord;
        return this.totalRecord % this.pageRecord == 0 ? i.intValue() : i.intValue() + 1;
    }
339684
public function getCount()
	{
		if ($this->usePaginator()) {
			return (new Paginator($this->getQuery()))->count();
		}
		$data_source = clone $this->data_source;
		$data_source->select(sprintf('COUNT(%s)', $this->checkAliases($this->primary_key)));
		$data_source->resetDQLPart('orderBy');

		return (int) $data_source->getQuery()->getSingleScalarResult();
	}
735854
public function totalPages()
    {
        $link = $this->_doc->navigation('self');
        return ($link && isset($link->totalpages)) ? $link->totalpages : 1;
    }
679630
private function getLimit()
    {
        return $this->strategy->getLimit($this->adapter, $this->getNumber(), $this->perPage);
    }
1042277
protected function getListPage()
    {
        $conditions = $this->query_filter;
        $conditions['limit'] = $this->data_limit;

        $list = (array) $this->page->getList($conditions);
        $this->prepareListPage($list);
        return $list;
    }
851038
public function getLimits()
    {
        $totalPages = $this->getTotalPages();

        $this->currentPage = ($this->currentPage > $totalPages) ? $totalPages : $this->currentPage;

        $dLimit = ($this->currentPage - 1) * $this->itemsPerPage;

        return array($dLimit, $this->itemsPerPage);
    }
659452
public function getLastPage()
    {
        return (int) \max(self::MIN_PAGE, \ceil($this->getTotal() / $this->getLimit()));
    }
10647
public function getCurrentPageNumber()
    {
        $request = $this->getRequest();

        $optionsRenderer = $this->getOptionsRenderer();
        $parameterNames = $optionsRenderer['parameterNames'];
        if ($request->getParam($parameterNames['currentPage']) != '') {
            return (int) $request->getParam($parameterNames['currentPage']);
        }

        return (int) 1;
    }
846665
public function getPageCount() : int
    {
        if($this->lastResponse && $this->lastResponse->getHeaderLine('X-Total-Pages')) {
            return (int)$this->lastResponse->getHeaderLine('X-Total-Pages');
        }

        return 0;
    }
98655
function getPageCount() {
		if (!$this->limit) {
			return 1;
		}
		$rem = ($this->getTotal() % $this->limit);
		$rem = ($rem >= 0) ? $rem : 0;
		$total_pages = ($this->getTotal() - $rem) / $this->limit;
		if ($rem)
			$total_pages++;
		return $total_pages;
	}
508418
public function paginate()
    {
        $count = count($this->_model->all());
        $this->_totalPages = ceil($count / $this->_limit);
        $page_at_offset = floor($this->_page + 1 / $this->_limit);
        $this->_offset = ($page_at_offset - 1) * $this->_limit;

        $this->_results = $this->_model->select($this->_capsule, $this->_limit, $this->_offset);

        return $this;
    }
680460
public function getPaginationCount()
	{
		list($orders, $this->orders) = array($this->orders, null);

		$columns = $this->columns;

		// Because some database engines may throw errors if we leave the ordering
		// statements on the query, we will "back them up" and remove them from
		// the query. Once we have the count we will put them back onto this.
		$total = $this->count();

		$this->orders = $orders;

		// Once the query is run we need to put the old select columns back on the
		// instance so that the select query will run properly. Otherwise, they
		// will be cleared, then the query will fire with all of the columns.
		$this->columns = $columns;

		return $total;
	}
1310886
public function paginate()
    {
        $this->total = $this->dataSource->getTotal($this->source);

        if (
            ($this->getPagesCount() > 0 && $this->getPage() > $this->getPagesCount()) ||
            $this->getPage() <= 0
        ) {
            $this->handler->wrongPageCallback();
        }

        $this->data = $this->dataSource->applyLimit(
            $this->source,
            $this->getPage(),
            $this->getPageSize()
        );

        return $this->data;
    }
724384
public function getPagesRange()
    {
        $pageRange  = $this->getPageRange();
        $pageNumber = $this->getCurrentPageNumber();
        $pageCount  = $this->getNumberOfPages();

        if ($pageRange > $pageCount) {
            $pageRange = $pageCount;
        }

        $delta = ceil($pageRange / 2 );

        if ($pageNumber - $delta > $pageCount - $pageRange) {
            $lowerBound = $pageCount - $pageRange + 1;
            $upperBound = $pageCount;
        } else {
            if ($pageNumber - $delta < 0) {
                $delta = $pageNumber;
            }

            $offset     = $pageNumber - $delta;
            $lowerBound = $offset + 1;
            $upperBound = $offset + $pageRange;
        }

        $pages = array();
        for ($pageNumber = $lowerBound; $pageNumber <= $upperBound; $pageNumber++) {
            $pages[$pageNumber] = $pageNumber;
        }

        return $pages;
    }
704718
private function getFromTo(): array
    {
        if ($this->count < $this->perPage || $this->perPage === null) {
            $start = 1;
            $end = $this->count;
        } else {
            if ($this->hasMorePages()) {
                $end = $this->perPage * $this->currentPage;
                $start = ($end - $this->perPage) + 1;
            } else {
                $endTest = $this->perPage * $this->currentPage;
                $start = ($endTest - $this->perPage) + 1;

                $end = $start + $this->getCountOnLastPage();
            }
        }

        return ['from' => $start, 'to' => $end];
    }