Get count for the number of resources available

@param array $urlParams Check Shopify API reference of the specific resource for the list of URL parameters

@return integer
543276
public function count($urlParams = array())
    {
        if (!$this->countEnabled) {
            throw new SdkException("Count is not available for " . $this->getResourceName());
        }

        $url = $this->generateUrl($urlParams, 'count');

        return $this->get(array(), $url, 'count');
    }
1225470
public Integer getPlansCount(final QueryParams params) {
        FluentCaseInsensitiveStringsMap map = doHEAD(Plans.PLANS_RESOURCE, params);
        return Integer.parseInt(map.getFirstValue(X_RECORDS_HEADER_NAME));
    }
1006783
public function count($conditions = '', $params = array()){
        return $this->db->builder()->select('COUNT(*)')->from($this->table)->where($conditions, $params)->queryValue();
    }
198734
protected function verifyUrl(array $urlParameters = array())
    {
        $expectedUrl = $this->getUrl($urlParameters);
        $currentUrl = $this->getDriver()->getCurrentUrl();

        if ($currentUrl !== $expectedUrl) {
            throw new UnexpectedPageException(sprintf('Expected to be on "%s" but found "%s" instead', $expectedUrl, $currentUrl));
        }
    }
1100927
public function getListeArchitectesProductifs($params=array())
	{
		$pagination = new paginationObject();
		$adresse = new archiAdresse();
		$nbEnregistrementsParPage=10;

		$sqlLimit="";

		$titre = "";
		if (isset($params['setTitre'])) {
			$titre = $params['setTitre']."<br><br>";
		}


		if (isset($params['sqlLimit'])) {
			$sqlLimit = $params['sqlLimit'];
		}
		$paginationHTML="";
		if (!isset($params['noPagination']) || $params['noPagination']==false) {
			$reqArchitectesCount = "
					SELECT  p.idPersonne, p.nom, p.prenom,  count(distinct ae.idAdresse) as nbAdresses
					FROM personne p
					LEFT JOIN personne p2 ON p2.idPersonne = p.idPersonne
					LEFT JOIN _evenementPersonne ep ON ep.idPersonne = p2.idPersonne
					LEFT JOIN _evenementEvenement ee ON ee.idEvenementAssocie = ep.idEvenement
					LEFT JOIN _adresseEvenement ae ON ae.idEvenement = ee.idEvenement
					WHERE ae.idAdresse IS NOT NULL
					GROUP BY p.idPersonne
					";

			$resArchitectesCount = $this->connexionBdd->requete($reqArchitectesCount);

			$arrayPagination=$pagination->pagination(
					array(
							'nomParamPageCourante'=>'archiPageCouranteArchitectes',
							'nbEnregistrementsParPage'=>$nbEnregistrementsParPage,
							'nbEnregistrementsTotaux'=>mysql_num_rows($resArchitectesCount),
							'typeLiens'=>'noformulaire'
					)
			);

			$sqlLimit = "LIMIT ".$arrayPagination['limitSqlDebut'].", ".$nbEnregistrementsParPage;
		}
		// liste des architectes
		$reqArchitectes = "
		SELECT  p.idPersonne, p.nom, p.prenom,  count(distinct ae.idAdresse) as nbAdresses
		FROM personne p
		LEFT JOIN personne p2 ON p2.idPersonne = p.idPersonne
		LEFT JOIN _evenementPersonne ep ON ep.idPersonne = p2.idPersonne
		LEFT JOIN _evenementEvenement ee ON ee.idEvenementAssocie = ep.idEvenement
		LEFT JOIN _adresseEvenement ae ON ae.idEvenement = ee.idEvenement
		WHERE ae.idAdresse IS NOT NULL
		GROUP BY p.idPersonne
		ORDER BY nbAdresses DESC
		$sqlLimit
		";

		$resArchitectes = $this->connexionBdd->requete($reqArchitectes);
		$tableau = new tableau();

		if (!isset($params['noPagination']) || $params['noPagination']==false) {
			$paginationHTML = $arrayPagination['html']."<br>";
		}


		while ($fetchArchitectes = mysql_fetch_assoc($resArchitectes)) {
			$tableau->addValue("<a href='".$this->creerUrl('', 'evenementListe', array('selection'=>'personne', 'id'=>$fetchArchitectes['idPersonne']))."'>".$fetchArchitectes['nom']." ".$fetchArchitectes['prenom']."</a>&nbsp;(".$fetchArchitectes['nbAdresses'].")");

			$tableau->addValue("<img src='".$adresse->getUrlImageFromPersonne($fetchArchitectes['idPersonne'], 'mini')."' alt=\"".$fetchArchitectes['nom']." ".$fetchArchitectes['prenom']."\" title=\"".$fetchArchitectes['nom']." ".$fetchArchitectes['prenom']."\" >");
		}

		return $titre.$paginationHTML.$tableau->createHtmlTableFromArray(2, "", "tableau");
	}
1268463
public function getCounter($id, Models\CounterParams $params)
    {
        $resource = 'counter/' . $id;
        $response = $this->sendGetRequest($resource, $params->toArray());
        $counter = new Models\GetCounterResponse($response);
        return $counter->getCounter();
    }
1335307
private function doGetStatements($url, array $urlParameters = array())
    {
        $request = $this->requestHandler->createRequest('get', $url, $urlParameters);
        $response = $this->requestHandler->executeRequest($request, array(200));

        $contentType = $response->getHeader('Content-Type')[0];
        $body = (string) $response->getBody();
        $attachments = array();

        if (false !== strpos($contentType, 'application/json')) {
            $serializedStatement = $body;
        } else {
            $boundary = substr($contentType, strpos($contentType, '=') + 1);
            $parts = $this->parseMultipartResponseBody($body, $boundary);
            $serializedStatement = $parts[0]['content'];

            unset($parts[0]);

            foreach ($parts as $part) {
                $attachments[$part['headers']['X-Experience-API-Hash'][0]] = array(
                    'type' => $part['headers']['Content-Type'][0],
                    'content' => $part['content'],
                );
            }
        }

        if (isset($urlParameters['statementId']) || isset($urlParameters['voidedStatementId'])) {
            return $this->statementSerializer->deserializeStatement($serializedStatement, $attachments);
        } else {
            return $this->statementResultSerializer->deserializeStatementResult($serializedStatement, $attachments);
        }
    }
657379
protected function parseUrlParams($url_params)
    {
        if ($url_params != '#' && (is_array($url_params) || (strpos($url_params, 'http') !== 0 && strpos($url_params, '/') !== 0))) {
            if (!is_array($url_params))
                $url_params = array($url_params);
            $url_to = Rails::application()->router()->urlFor($url_params, true);
        } else {
            $url_to = $url_params;
        }
        return $url_to;
    }
308885
public function getCounts($countables = [])
    {
        $counts = new CountableResults;

        $strategies = $this->buildCountableStrategies();

        // determine which countables to count for
        $countables = ( ! empty($countables))
                        ?   array_intersect($this->getCountables(), $countables)
                        :   $this->getActiveCountables();

        foreach ($countables as $parameterName) {

            // should we skip it no matter what?
            if ($this->isCountableIgnored($parameterName)) continue;

            $strategy = isset($strategies[$parameterName]) ? $strategies[$parameterName] : null;

            // normalize the strategy so that we can call_user_func on it
            if (is_a($strategy, ParameterCounterInterface::class)) {

                $strategy = [ $strategy, 'count' ];

            } elseif (is_null($strategy)) {
                // default, let it be handled by applyParameter

                $strategy = [ $this, 'countParameter' ];

            } elseif ( ! is_callable($strategy)) {

                throw new ParameterStrategyInvalidException(
                    "Invalid counting strategy defined for parameter '{$parameterName}',"
                    . " must be ParameterFilterInterface, classname, callable or null"
                );
            }

            // start with a fresh query
            $query = $this->getCountableBaseQuery();

            // apply the filter while temporarily ignoring the current countable parameter,
            // unless it is forced to be included
            $includeSelf = in_array($parameterName, $this->includeSelfInCount);

            if ( ! $includeSelf) {
                $this->ignoreParameter($parameterName);
            }

            $this->apply($query);

            if ( ! $includeSelf) {
                $this->unignoreParameter($parameterName);
            }

            // retrieve the count and put it in the results
            $counts->put($parameterName, call_user_func_array($strategy, [$parameterName, $query, $this]));
        }

        return $counts;
    }
802758
public final function count(string $query = null, array $queryParams = null): ?int
    {
        $queryBuilder = new QueryBuilder($this->db->getLink());
        $queryBuilder->setTable($this->table);

        if ($query || $queryParams) {
            $queryBuilder->where($query, $queryParams);
        }

        return $queryBuilder->count();
    }
591343
protected function getQueryParam($param, $url) {
    $keys = [];
    $parse = parse_url($url);
    parse_str($parse['query'], $keys);

    if (isset($keys[$param])) {
      return $keys[$param];
    }

    return FALSE;
  }
1032332
def count(cls, **kwargs):
        
        url = recurly.base_uri() + cls.collection_path
        if kwargs:
            url = '%s?%s' % (url, urlencode_params(kwargs))
        return Page.count_for_url(url)
1176349
public function getRequestTargetWithParams($params)
    {
        $target = $this->getFullPath();

        if ($params) {
            $target .= '?' . http_build_query($params);
        }

        return $target;
    }
777712
public function getStatus(array $queryParams = [])
    {
        $response = $this->client->get($this->uri(), [
            'query' => $queryParams,
        ]);

        return $this->handleResponse($response);
    }
257504
private function prepareParametersUrl(array $params, array $allowedParams)
    {
        $allowedParams = array_flip($allowedParams);
        $params = array_intersect_key($params, $allowedParams);

        $paramsUrlItems = [];
        foreach ($params as $key => $param) {
            $paramsUrlItems[] = $key . '=' . urlencode($param);
        }

        $paramsUrl = join('&', $paramsUrlItems);
        if (strlen($paramsUrl) > 0) {
            $paramsUrl = '?' . $paramsUrl;
        }

        return $paramsUrl;
    }
1148068
public function getPagerUrl($params = [])
    {
        $urlParams = [];
        $urlParams['_current'] = true;
        $urlParams['_escape'] = true;
        $urlParams['_use_rewrite'] = true;
        $urlParams['_query'] = $params;

        return $this->getUrl('*/*/*', $urlParams);
    }
655966
public function count($params) {
        $orm = !is_null($params['ormObject']) ? $params['ormObject'] : ORM::for_table($params['table']);

        return $orm->count();
    }