Get the number of items (different values) in each dataset used by this
question. This is the minimum number of items in any dataset used by this
question.
@return int the number of items available.
517608
public function get_number_of_items() {
        global $DB;

        if (is_null($this->itemsavailable)) {
            $this->itemsavailable = $DB->get_field_sql('
                    SELECT MIN(qdd.itemcount)
                      FROM {question_dataset_definitions} qdd
                      JOIN {question_datasets} qd ON qdd.id = qd.datasetdefinition
                     WHERE qd.question = ?
                    ', array($this->questionid), MUST_EXIST);
        }

        return $this->itemsavailable;
    }
1020643
public function getCount()
    {
        if ($this->count === NULL) {
            $this->count = $this->getModel()->getCount();
        }

        return $this->count;
    }
444309
public function getTotalItems()
    {
        $total = 0;
        
        foreach ($this->items as $item) {
            $total += ($item->Quantity) ? $item->Quantity : 1;
        }

        return $total;
    }
311205
protected function getMin()
    {
        $params = array_filter(func_get_args() ?: [], function ($arg) {
            return !is_null($arg) && $arg !== "";
        });

        return count($params) > 0 ? min($params) : null;
    }
1021302
public function getItemsCount()
    {
        $count = 0;
        foreach ($this->feeds_registry as $feed) {
            $count += $feed->getItemsCount();
        }
        return $count;
    }
903151
public function min()
    {
        if (!isset($this->meta['min'])) {
            $this->meta['min'] = (int) @min($this->get());
        }

        return $this->meta['min'];
    }
264501
public function getTotalItems()
    {
        if ($this->totalItems === null) {
            $this->totalItems = count($this->list);
        }

        return $this->totalItems;
    }
786555
public function getItems()
	{
		/**
		 * @var array $res
		 */
		$res = array();
		foreach ( $this->iter as /** @var XPathItem $item */ $item )
		{
			if ( count( $res ) == 10)
				break;

			$res[] = $item->CloneInstance();
		}

		return $res;
	}
107114
final public function count(): int
    {
        // If size if known, return it
        if (isset($this->size)) {
            return $this->size;
        }

        // Calculate, cache and then return the size
        return $this->size = count($this->data);
    }
416672
protected function getLimit()
    {
        $limit = $this->activeState()->getLimit();
        if (!in_array($limit, $this->limits)) {
            //We are using lowest limit by default
            return $this->limits[0];
        }

        return $limit;
    }
460541
public function nextDataAvailable()
    {
        return ($this->position+1 >= $this->collection->getStartIndex() and
                $this->position+1 <= $this->collection->getEndIndex());
    }
1243082
protected function _getItemsData()
    {
        /** @var \Magento\CatalogSearch\Model\ResourceModel\Fulltext\Collection $productCollection */
        $productCollection = $this->getLayer()->getProductCollection();
        $optionsFacetedData = $productCollection->getFacetedData($this->getFilterField());

        $items     = [];

        if (isset($optionsFacetedData['__other_docs'])) {
            $this->hasMoreItems = $optionsFacetedData['__other_docs']['count'] > 0;
            unset($optionsFacetedData['__other_docs']);
        }

        $minCount = !empty($optionsFacetedData) ? min(array_column($optionsFacetedData, 'count')) : 0;

        if (!empty($this->currentFilterValue) || $minCount < $productCollection->getSize()) {
            foreach ($optionsFacetedData as $value => $data) {
                $items[$value] = [
                    'label' => $this->tagFilter->filter($value),
                    'value' => $value,
                    'count' => $data['count'],
                ];
            }
        }

        $items = $this->addOptionsData($items);

        return $items;
    }
440690
public function count() {
		if(!$this->initialized)
			$this->initialize();

		return count($this->elements) - count($this->toRemove) + count($this->toAdd);
	}
497713
public function numberOfRows()
    {
        if (isset($this->statement)) {
            $this->statement->store_result();
            return $this->statement->num_rows ?: $this->statement->affected_rows;
        } else if (isset($this->result)) {
            return $this->result->num_rows;
        } else {
            throw new Exception('Error: The database result resource is not currently set.');
        }
    }
644161
public function count()
    {
        return isset($this->raw['size'])
            ? (int) $this->raw['size']
            : (isset($this->raw['data']) && is_array($this->raw['data'])
                ? count($this->raw['data'])
                : null);
    }
898282
public function GetTotalDiscountValue()
    {
        $iCurrentPosition = $this->getItemPointer();
        $this->GoToStart();

        $dTotalDiscountValue = 0;

        while ($oItem = &$this->Next()) {
            $dTotalDiscountValue += ($oItem->dPriceTotal - $oItem->dPriceTotalAfterDiscount);
        }
        $this->setItemPointer($iCurrentPosition);

        return $dTotalDiscountValue;
    }
1225942
public function count()
    {
        if ($this->count === null) {
            $this->count = $this->resultSet->count();
        }
        return $this->count;
    }