Returns the total item count in the collection
Returns 0 if the header isn't set

@return int
518437
public function getItemCount() : int
    {
        if($this->lastResponse && $this->lastResponse->getHeaderLine('X-Total-Count')) {
            return (int)$this->lastResponse->getHeaderLine('X-Total-Count');
        }

        return 0;
    }
366464
public function count()
    {
        $count = 0;

        foreach ($this->_indices as $index) {
            $count += $this->_indices->count();
        }

        return $count;
    }
607640
public function getTotal()
    {
        if (is_null($this->_total)) {
            if (($total = $this->predictTotal())) {
                $this->_total = $total;
            } elseif (isset($this->_items)) {
                return count($this->_items);
            } else {
                $this->_total = false;
            }
        }

        return $this->_total;
    }
1033267
public function getRequiredNumber()
    {
        $count = $this->requiredCount - count($this->items);

        // if we have more than we need, then we require 0
        if ($count < 0) {
            $count = 0;
        }

        return $count;
    }
396143
public function getReviewAndRatingItemsCount()
    {
        $user = $this->getUser();
        $count = 0;
        if ($user) {
            $count = $this
                ->getContainer()
                ->get(UserReviewAndRatingBridgeInterface::class)
                ->getReviewAndRatingListCount($user->getId());
        }

        return $count;
    }
846665
public function getPageCount() : int
    {
        if($this->lastResponse && $this->lastResponse->getHeaderLine('X-Total-Pages')) {
            return (int)$this->lastResponse->getHeaderLine('X-Total-Pages');
        }

        return 0;
    }
1243930
public function getTotalItems()
    {
        $total = 0;

        foreach ($this->Items() as $item) {
            $total += ($item->Quantity) ? $item->Quantity : 1;
        }

        $this->extend("updateTotalItems", $total);

        return $total;
    }
1126153
public function getItemsCount()
    {
        $itemsCount = 0;

        foreach ($this->_aBasketContents as $oBasketItem) {
            $itemsCount += $oBasketItem->getAmount();
        }

        return $itemsCount;
    }
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;
    }
264501
public function getTotalItems()
    {
        if ($this->totalItems === null) {
            $this->totalItems = count($this->list);
        }

        return $this->totalItems;
    }
1371997
public function count()
    {
        return ( self::$assigned[$this->type] - self::START_AT + self::INCREMENT ) / self::INCREMENT;
    }
830527
public function count()
    {
        return $this->collection->count() > $this->totalRecords ? $this->totalRecords : $this->collection->count();
    }
1057605
public function count($totalItems = true)
        {
            $cart = $this->getContent();

            if(false === $totalItems) {
                return count($cart->_fields);
            }

            $count = 0;

            foreach($cart->_fields as $rowId) {
                $row = $cart->$rowId;
                $count += $row->qty;
            }

            return $count;
        }
69990
public final long getTotalCount()
    {
        long result = 0;
        result = result + _storedItemManager.getStatistics().getTotalCount();
        result = result + _unstoredItemManager.getStatistics().getTotalCount();
        return result;
    }
257582
public function count()
    {
        if (is_array($this->_array) || $this->_array instanceof Countable) {
            return count($this->_array);
        }
        return 0;
    }
632378
public function getTotalPages()
    {
        if ($this->totalItems > 0 && $this->itemsPerPage > 0) {
            if (($this->totalItems%$this->itemsPerPage) != 0) {
                return (int)($this->totalItems/$this->itemsPerPage) + 1;
            }
            else {
                return (int)($this->totalItems/$this->itemsPerPage);
            }
        }

        return 0;
    }
1192641
public function getCurrentPageLastItem()
    {
        $first = $this->getCurrentPageFirstItem();

        if (empty($first)) {
            return 0;
        }

        $last = $first + $this->limit - 1;

        if ($last > $this->total) {
            return $this->total;
        }

        return $last;
    }