Supported Versions: PHP 4, PHP 5, PHP 7, PHP 8
Counts all elements in an array or in a Countable object
Alias sizeof
<?php count(Countable|array $value, int $mode = COUNT_NORMAL): int
<?php         if ($this->nextAttemptTimer === null && (\count($this->connectQueue) > 0 || $this->resolved[Message::TYPE_A] === false || $this->resolved[Message::TYPE_AAAA] === false)) {

            $this->nextAttemptTimer = $this->loop->addTimer(self::CONNECTION_ATTEMPT_DELAY, function () use ($that, $resolve, $reject) {

                $that->nextAttemptTimer = null;
<?php     public function mixIpsIntoConnectQueue(array $ips)

    {

        \shuffle($ips);

        $this->ipsCount += \count($ips);

        $connectQueueStash = $this->connectQueue;

        $this->connectQueue = array();

        while (\count($connectQueueStash) > 0 || \count($ips) > 0) {
<?php         $this->ipsCount += \count($ips);

        $connectQueueStash = $this->connectQueue;

        $this->connectQueue = array();

        while (\count($connectQueueStash) > 0 || \count($ips) > 0) {

            if (\count($ips) > 0) {

                $this->connectQueue[] = \array_shift($ips);

            }
<?php         $connectQueueStash = $this->connectQueue;

        $this->connectQueue = array();

        while (\count($connectQueueStash) > 0 || \count($ips) > 0) {

            if (\count($ips) > 0) {

                $this->connectQueue[] = \array_shift($ips);

            }

            if (\count($connectQueueStash) > 0) {
<?php             if (\count($ips) > 0) {

                $this->connectQueue[] = \array_shift($ips);

            }

            if (\count($connectQueueStash) > 0) {

                $this->connectQueue[] = \array_shift($connectQueueStash);

            }

        }
<?php     public function handleConnection(ConnectionInterface $connection)

    {


        if ($this->limit !== null && \count($this->connections) >= $this->limit) {

            $this->handleError(new \OverflowException('Connection closed because server reached connection limit'));

            $connection->close();

            return;
<?php         });




        if ($this->pauseOnLimit && !$this->autoPaused && \count($this->connections) >= $this->limit) {

            $this->autoPaused = true;



            if (!$this->manuPaused) {
<?php         unset($this->connections[\array_search($connection, $this->connections)]);




        if ($this->autoPaused && \count($this->connections) < $this->limit) {

            $this->autoPaused = false;



            if (!$this->manuPaused) {