Count Data.

@param booelan $load If the flag is set to on. If the qurey is set, it will
perform a count query instead of loading all the objects

@return int
762949
public function count($load = true)
    {
        //if query is set, and the data is not loaded
        //lets use the query to get the count
        if (isset($this->_query) && !$this->isLoaded() && !$load) {
            $query = AnDomainQuery::getInstance($this->getRepository(), $this->_query);

            return $query->fetchValue('count(*)');
        } else {
            $this->_loadData();
            $result = parent::count();
        }

        return $result;
    }
153677
public function count(): int
    {
        $collection = $this->documentManager->getCollection($this->documentClass);

        return $collection->count($this->query);
    }
609630
public function count(string $condition = '', array $params = array()) {
        $this->model->builder->select('COUNT(*)')
            ->from($this->model->tableName);
        if ($condition) {
            $this->model->builder->where($condition, $params);
        }
        $r = $this->model->builder->query();
        if (!is_array($r) || 0 === count($r)) {
            return false;
        }
        return (int) reset($r[0]);
    }
1351446
public function select_count($query, $args = array(), $cache = null)
    {
        $result = $this->select_first($query, $args, $cache);
        if ($result) {
            return current($result);
        }
        return 0;
    }
546208
public function count($columns = null)
    {
        $this->compileWheres();
        $result = $this->query->count();

        return (int) $result;
    }
129729
public function count()
    {
        $query = clone $this;
        $query->select = 'count(*)';
        return (int)$query->execute()->fetch(PDO::FETCH_NUM)[0];
    }
730743
public function count()
    {
        if ($this->cnt === null) {
            $this->cnt = $this->getDataSource()->count();
        }
        return $this->cnt;
    }
275710
public function countAll($executeQuery = true)
    {
        $queryBuilder = $this->createQueryBuilder('p')
            ->select('COUNT(p)');

        return $executeQuery ? $queryBuilder->getQuery()->getSingleScalarResult() : $queryBuilder;
    }
55148
public function count(Import $import)
	{
		// create iterator
		$iterator = new Reader($import->getDatapath(), $this->key);

		// iterate over each row
		$this->data_count = iterator_count($iterator);

		// return count
		return $this->data_count;
	}
552941
public function countTotal()
    {
        $em = $this->getDoctrine()->getManager();

        $qb = $em->getRepository('AsmTranslationLoaderBundle:Translation')
            ->createQueryBuilder('tl')
            ->select('COUNT(tl)');

        return $qb->getQuery()->getSingleScalarResult();
    }
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();
    }
1371264
function Count($where = null) {
		$this->LoadSchema();
		if ($this->UseCache('count')) {
			$cacheid = md5(json_encode($where));

			if ($value = $this->GetCache('count', $cacheid))
				return $value;
		}

		$this->ResetQuery(array(
			'method' => 'count',
			'table' => $this->table,
			'where' => $where,
		));

		$this->Trigger('access', $where);
		if (!$this->continue)
			return 0;

		$this->Trigger('pull', $where);
		if (!$this->continue)
			return 0;

		$this->Trigger('getall', $where);
		if (!$this->continue)
			return 0;

		$this->db->select('COUNT(*) AS count');
		$this->db->from($this->table);
		if ($where = $this->FilterFields($where, 'where'))
			$this->db->where($where);
		$row = $this->db->get()->row_array();
		if (!$this->continue)
			return 0;

		return isset($cacheid) ? $this->SetCache('count', $cacheid, $row['count']) : $row['count'];
	}
1015648
public function count($key)
    {
        if (!$this->redis()->exists($key)) {
            return false;
        }
        $count = $this->redis()->incr($key);
        return $count;
    }
200763
def count(self, objectType, *args, **coolArgs) :
		""""""
		return self._makeLoadQuery(objectType, *args, **coolArgs).count()
886880
public function count($mode = null)
    {
        if ($this->data == null) {
            $ret = $this->client->get($this->url, $this->query);
            $this->data = $ret->getData();
        }
        return (int) ($this->data['_total_items'] ?? $this->data['total_items'] ?? 0);
    }
1216115
public function count()
    {
        $this->throwIfContextInvalid();

        $this->reloadQueryAdapter();
        $results = $this->activeQuery->fetch();

        $this->resetCurrentQuery();

        return count($results);
    }
811089
public function count(): ?int
    {
        $result = $this->builderOnCount(
            $this->createCountBuilderFromBuilder($this->createIndexModelBuilder())
        )->execute()->fetchColumn();

        return $result === false ? null : (int)$result;
    }