Get number of sitemap.

@param array|UrlEntryInterface[] $urlEntries

@return int
965777
private function getNumberOfSitemap(array $urlEntries)
    {
        $total = count($urlEntries);

        if ($total <= $this->maxPerSitemap) {
            return 1;
        }

        return intval(ceil($total / $this->maxPerSitemap));
    }
922618
public function getTotalPages($totalNumber = null)
    {
        if (is_null($totalNumber)) {
            $totalNumber = $this->totalNumberOfElements;
        }

        return $this->getLimit() ? (ceil($totalNumber / $this->getLimit())) : 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;
    }
1366621
public function getNumProcessedWebsites()
    {
        $numProcessed = $this->index + 1;

        if ($numProcessed > $this->getNumSites()) {
            return $this->getNumSites();
        }

        return $numProcessed;
    }
57159
protected function getCount($arguments = null)
    {
        if (null === $arguments) {
            $arguments = $this->getRequestArguments();
        }

        $count = (int) ($this->settings['paging']['perPage']);

        if (array_key_exists('count', $arguments)) {
            $count = (int) $this->requestArguments['count'];
        }

        $maxCount = (int) $this->settings['paging']['maximumPerPage'];
        $count = min([$count, $maxCount]);

        $this->setConfigurationValue('count', $count);

        return $count;
    }
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;
	}
735854
public function totalPages()
    {
        $link = $this->_doc->navigation('self');
        return ($link && isset($link->totalpages)) ? $link->totalpages : 1;
    }
1219848
public function sitemap($page = null)
    {
        $ret = '';

        $pageLimit = 10000;

        if (isset($this->tsSetup['pageLimit']) && $this->tsSetup['pageLimit'] != '') {
            $pageLimit = (int)$this->tsSetup['pageLimit'];
        }

        $pageItems     = count($this->sitemapPages);
        $pageItemBegin = $pageLimit * ($page - 1);

        if ($pageItemBegin <= $pageItems) {
            $this->sitemapPages = array_slice($this->sitemapPages, $pageItemBegin, $pageLimit);

            $ret = $this->createSitemapPage();
        }

        return $ret;
    }
424826
public function getSitesFromIds($idSites, $limit = false)
    {
        if (count($idSites) === 0) {
            return array();
        }

        if ($limit) {
            $limit = "LIMIT " . (int)$limit;
        } else {
            $limit = '';
        }

        $idSites = array_map('intval', $idSites);

        $db    = $this->getDb();
        $sites = $db->fetchAll("SELECT * FROM " . $this->table . "
                                WHERE idsite IN (" . implode(", ", $idSites) . ")
                                ORDER BY idsite ASC $limit");

        return $sites;
    }
117924
protected function fillSitemapIndex( $sitemap, $numberOfResults, $root )
    {
        $numberOfPage = (int)ceil( $numberOfResults / static::PACKET_MAX );
        for ( $sitemapNumber = 1; $sitemapNumber <= $numberOfPage; $sitemapNumber++ )
        {
            $sitemapElt       = $sitemap->createElement( "sitemap" );
            $locUrl           = $this->generateUrl( "_novaseo_sitemap_page", [ "page" => $sitemapNumber ], UrlGeneratorInterface::ABSOLUTE_URL );
            $loc              = $sitemap->createElement( "loc", $locUrl );
            $date             = new DateTime();
            $modificationDate = $date->format( 'c' );
            $mod              = $sitemap->createElement( 'lastmod', $modificationDate );
            $sitemapElt->appendChild( $loc );
            $sitemapElt->appendChild( $mod );
            $root->appendChild( $sitemapElt );
        }
    }
301806
public function getUrlIdMap(array $urls)
    {
        $map = array();

        if (!empty($urls)) {
            $q = $this->getConnection()->createSelectQuery();
            $q
                ->select('id', 'url')
                ->from(self::URL_TABLE)
                ->where($q->expr->in('url', $urls));

            $statement = $q->prepare();
            $statement->execute();
            foreach ($statement->fetchAll(PDO::FETCH_ASSOC) as $row) {
                $map[$row['url']] = $row['id'];
            }
        }

        return $map;
    }
922933
private function computeLastCallOfAnyFrom(array $methods): int
    {
        $calls = array_filter($this->callerTokens, function (array $token) use ($methods) {
            return in_array($token['token']['content'], $methods, true);
        });
        if (count($calls) > 0) {
            return (int) array_search(end($calls), $this->callerTokens, true);
        }

        return -2;
    }
194292
public function getPages()
    {
        return (int)ceil((float)$this->provider->count() / (float)$this->pagelength);
    }
1317098
private function getTrackerHosts($urls)
    {
        $hosts = array();
        foreach ($urls as $url) {
            $url = parse_url($url);
            if (isset($url['host'])) {
                $hosts[] = $url['host'];
            }
        }
        return $hosts;
    }
1165264
protected function fullUrlWithoutQuery($keys)
    {
        if ($keys instanceof Arrayable) {
            $keys = $keys->toArray();
        }

        $keys = (array) $keys;

        $request = request();

        $query = $request->query();
        Arr::forget($query, $keys);

        $question = $request->getBaseUrl().$request->getPathInfo() == '/' ? '/?' : '?';

        return count($request->query()) > 0
            ? $request->url().$question.http_build_query($query)
            : $request->fullUrl();
    }
1118346
public function linkref_addindex($matches)
    {
        $key = $matches[1];
        $this->linkrefs[$key] = $this->urls[$matches[3]];

        return $this->get_replacement($this->add('['.$key.']')) . $matches[2];
    }
1059923
private function getContentTypesNumbers(array $contentTypes): array
    {
        $contentTypesNumbers = array_column($contentTypes, 'id');

        return array_combine($contentTypesNumbers, array_fill_keys($contentTypesNumbers, false));
    }