Count total number of items in collection

@return mixed
423702
public function totalCount()
    {
        if (!isset($this->parameters['conditions'])) {
            return count($this->value);
        }

        if (!$this->totalCount) {
            if (is_callable($this->totalCountCalculation)) {
                $this->totalCount = ($this->totalCountCalculation)();
            } else {
                $mongo = Entity::getInstance()->getDatabase();
                $entity = $this->entityClass;
                $this->totalCount = $mongo->count($entity::getCollection(), $this->parameters['conditions']);
            }
        }

        return $this->totalCount;
    }
942873
public function getContentsWithCollectionsCount()
    {
        $query = $this->connection->createQueryBuilder();
        $query->select(
                'COUNT(DISTINCT eic.contentobject_id) AS count'
            )
            ->from($this->connection->quoteIdentifier('ezinfocollection'), 'eic')
            ->innerJoin(
                'eic',
                $this->connection->quoteIdentifier('ezcontentobject'),
                'eco',
                $query->expr()->eq(
                    $this->connection->quoteIdentifier('eic.contentobject_id'),
                    $this->connection->quoteIdentifier('eco.id')
                )
            )
            ->leftJoin(
                'eic',
                $this->connection->quoteIdentifier('ezcontentobject_tree'),
                'ecot',
                $query->expr()->eq(
                    $this->connection->quoteIdentifier('eic.contentobject_id'),
                    $this->connection->quoteIdentifier('ecot.contentobject_id')
                )
            );

        $statement = $query->execute();

        return (int)$statement->fetchColumn();
    }
1371997
public function count()
    {
        return ( self::$assigned[$this->type] - self::START_AT + self::INCREMENT ) / self::INCREMENT;
    }
264501
public function getTotalItems()
    {
        if ($this->totalItems === null) {
            $this->totalItems = count($this->list);
        }

        return $this->totalItems;
    }
588612
public function count()
    {
        if(!isset($this->_count))
            $this->_count = $this->_iterator->count();

        return $this->_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);
    }
1353595
public function count()
    {
        $count = 0;
        foreach ($this->fields as $group) {
            $count += count($group);
        }
        return $count;
    }
367947
public function items() : Int
    {
        $totalItems = 0;

        if( ! empty(Properties::$items) ) foreach( Properties::$items as $item )
        {
            $totalItems += $item['quantity'];
        }

        return $totalItems;
    }
93048
protected function calculateTotalItemCount()
	{
		$baseCriteria=$this->model->getDbCriteria(false);
		if($baseCriteria!==null)
			$baseCriteria=clone $baseCriteria;
		$count=$this->model->count($this->getCountCriteria());
		$this->model->setDbCriteria($baseCriteria);
		return $count;
	}
543772
public function count()
    {
        $counts = array_map(function(QueueInterface $queue) {
            return $queue->count();
        }, $this->getQueues());

        return array_sum($counts);
    }
1188994
public function countUngenerated()
    {
        $query = $this->createQuery();
        $query->matching($query->logicalAnd($query->equals('resource', null), $query->equals('staticResource', null)));
        return $query->count();
    }
492665
public function count($totalItems = true)
    {
        $items = $this->getCart();

        if (!$totalItems) {
            return $items->count();
        }

        $count = 0;

        foreach ($items as $row) {
            $count += $row->qty;
        }

        return $count;
    }
699358
public function totalPages()
    {
        $total = $this->totalObjects();
        $perPage = $this->objectsPerPage();

        return (int) ceil($total / $perPage);
    }
628552
public function getTotalItemCount()
    {
        if ($this->rowCount !== null) {
            return $this->rowCount;
        }

        $param = null;

        if (is_array($this->select)) {
            $select = $this->select[0];
            $param = $this->select[1];
            $adt = $this->sql->getAdapter();

            $statement = $adt->query(sprintf("SELECT COUNT(1) AS c FROM (%s) AS original_select", $select), $adt::QUERY_MODE_PREPARE);
        } else {
            $select = clone $this->select;
            $select->reset(Select::LIMIT);
            $select->reset(Select::OFFSET);
            $select->reset(Select::ORDER);

            $countSelect = new Select();
            $countSelect->columns(array('c' => new Expression('COUNT(1)')));
            $countSelect->from(array('original_select' => $select));

            $statement = $this->sql->prepareStatementForSqlObject($countSelect);
        }

        $result = $statement->execute($param);
        $row = $result->current();

        $this->rowCount = $row['c'];

        return $this->rowCount;
    }
444101
public function count()
    {
        if (count($this->stack) || !($this->array instanceof \Countable)) {
            $this->squash();
        }
        return $this->array->count();
    }
137867
public function count()
    {
        $total = 0;
        $sql = clone($this);
        $sql->_fields = 'COUNT(*) AS total';
        foreach ($sql->getJoins() as $join) {
            $join->setFields(null);
        }
        $result = $this->_adapter->query($sql, $sql->getParameters());
        if (!empty($result)) {
            $total = intval($result[0]['total']);
        }
        return $total;
    }
630008
public function count()
    {
        $this->preCount();
        $result = $this->dataStore->count();

        return $this->postCount($result);
    }