Get a pages count.

@param int $linesNumber The lines number.
@param int $divider The divider.
@return int Returns the pages count in case of success, -1 otherwise.
4854
public static function getPagesCount($linesNumber, $divider) {
        if ($linesNumber < 0 || $divider < 0) {
            return -1;
        }
        $pagesCount = intval($linesNumber / $divider);
        if (0 < ($linesNumber % $divider)) {
            ++$pagesCount;
        }
        return $pagesCount;
    }
1273293
def pages_count(self):
        ''''''
        if not self.limit or self.count<self.limit:
            return 1
        if self.count % self.limit <= self.orphans:
            return self.count // self.limit
        return int(math.ceil(float(self.count)/self.limit))
966282
public function getNumRows($cursor = null)
	{
		$this->connect();

		if ($cursor instanceof \PDOStatement)
		{
			return $cursor->rowCount();
		}

		if ($this->prepared instanceof \PDOStatement)
		{
			return $this->prepared->rowCount();
		}

		return 0;
	}
1048674
public function getCellId($cellNumber, $rowNumber = null)
    {
        if ($cellNumber / 26 < 1) {
            return chr(65 + $cellNumber) . $rowNumber;
        }

        return $this->getCellId((int)($cellNumber / 26) - 1) . chr(65 + $cellNumber % 26) . $rowNumber;
    }
560100
public function getImageCount($pageNumber)
    {


        $strURI = Product::$baseProductUri . '/pdf/' . $this->getFileName() . '/pages/' . $pageNumber . '/images';

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

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

        $json = json_decode($responseStream);

        return count($json->Images->List);
    }
130408
public function totalPages()
    {
        $maxrows      = (($m = $this->getParameter('RowsPerPage')) !== null)?$m:$this->getLocal('MaxRows');
        $totalrecords = (($m = $this->getParameter('TotalRecords')) !== null)?$m:$this->getLocal('TotalRecords');

        if (empty($totalrecords))
            return 0;
        if(empty($maxrows))
            throw new FiltererException('filter \'paging-total-pages\' requires the MaxRows template variable to be set');

        $totalpages = intval(($totalrecords-1)/$maxrows)+1;

        return $totalpages;
    }
862088
@Override
  public int count() {

    int listSize = getList().size();
    int pageSize = getPageSize();
    int pageCount = listSize / pageSize;

    pageCount += listSize % pageSize > 0 ? 1 : 0;

    return pageCount;
  }
1050156
public function getNumRows($cursor = null)
    {
        $this->connect();

        if ($cursor instanceof Statement) {
            return $cursor->rowCount();
        } elseif ($this->prepared instanceof Statement) {
            return $this->prepared->rowCount();
        } else {
            return 0;
        }
    }
1196882
protected function getFileCount($resultsCount, $maxLinesInFile, $fileCounter)
    {
        $leftToInsert = $resultsCount - ($fileCounter * $maxLinesInFile);
        if ($leftToInsert <= $maxLinesInFile) {
            $count = $leftToInsert;
        } else {
            $count = $maxLinesInFile;
        }

        return $count;
    }
150393
public function getSegmentCount($pageNumber = '', $fragmentNumber = '')
    {


        if ($pageNumber == '')
            throw new Exception('page number not specified');

        if ($fragmentNumber == '')
            throw new Exception('fragment number not specified');


        $strURI = Product::$baseProductUri . '/pdf/' . $this->getFileName() . '/pages/' . $pageNumber . '/fragments/' . $fragmentNumber;

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

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

        $json = json_decode($responseStream);

        return count($json->TextItems->List);
    }
1286109
public function getPageCount()
    {
        if ($this->pageCount === null) {
            $catalog = $this->parser->getCatalog();

            $pages = PdfType::resolve(PdfDictionary::get($catalog, 'Pages'), $this->parser);
            $count = PdfType::resolve(PdfDictionary::get($pages, 'Count'), $this->parser);

            $this->pageCount = PdfNumeric::ensure($count)->value;
        }

        return $this->pageCount;
    }
529735
private static function getNumPages(int $limit, int $count): int
    {
        return (int) ceil($count / $limit);
    }
4769
public function getPagesCount()
    {
        return ceil($this->_grid->getState()->getDataCount() / $this->_grid->getState()->getRowsPerPage());
    }
723073
protected final int getLineNumber(final String lineNumber) {
        if (StringUtils.isNotBlank(lineNumber)) {
            try {
                return Integer.parseInt(lineNumber);
            }
            catch (NumberFormatException exception) {
                // ignore and return 0
            }
        }
        return 0;
    }
437756
public function getCount()
    {
        if ($this->_count !== null) {
            return $this->_count;
        }

        while ($this->_hasMore) {
            $this->fetchOutstanding();
        }

        return $this->_length;
    }
1219019
public function getNumChildrenDirect()
    {
        // direct children only
        $db = Database::connection();
        $v = [$this->cID];
        $num = $db->fetchColumn('select count(cID) as total from Pages where cParentID = ?', $v);
        if ($num) {
            return $num;
        }

        return 0;
    }
32675
public function getPageCount() : int
    {
        return intval($this->count / $this->pageSize) + ($this->count % $this->pageSize == 0 ? 0 : 1);
    }