Count Message

@return int
12749
public function countMessages()
    {
        $count = 0; // "Declare" variable before first usage.
        $octets = 0; // "Declare" variable since it's passed by reference
        $this->_protocol->status($count, $octets);
        return (int)$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);
    }
1315656
public function count(): int
    {
        $amount = 0;
        // iterate with $key so the key consumer from peek() can have a look
        foreach ($this->elements as $key => $element) {
            $amount++;
        }

        return $amount;
    }
176319
public function count()
    {
        $self         = clone $this;
        $self->type   = 'select';
        $self->select = ['COUNT(*) AS cnt'];
        $result       = $self->execute();
        return count($result[0]) > 0 ? (int) $result[0]['cnt'] : 0;
    }
827296
private int getUnSeenMessageCount() 
   {
      if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.entry(this, tc,"getUnseenMessageCount");
      
      int remain = 0;
      for (int x = nextIndex; x < messages.length; x++)
      {
         if (messages[x] != null) remain++;
      }
      
      if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.exit(this, tc,"getUnseenMessageCount", ""+remain);
      return remain;
   }
1188726
public function count()
    {
        $traversable = $this->optimizeUnwrap();

        if (is_array($traversable)) {
            return count($traversable);
        }

        return iterator_count($traversable);
    }
237135
def get_count(self, prefix=''):
        """"""
        return sum([self.counters[key]
                    for key in self.messages if key.startswith(prefix)])
61431
public function count() : int
    {
        return (int)$this->getQueryBuilder()
            ->count('*')
            ->from($this->table)
            ->execute()->fetchColumn(0);
    }
243827
public function ping()
    {
        Debug::Log(Debug::INFO, 'ping()');
        $this->simpleCommand(Message::PINGREQ);

        $this->ping_queue[] = time();

        return count($this->ping_queue);
    }
1259215
public function count()
	{
		switch ($this->Mode)
		{
			case self::MODE_ERROR:
				return 0;
				break;
			case self::MODE_SINGLE:
				return 1;
				break;
			case self::MODE_MULTIPLE:
				return count($this->Data);
				break;
		}
		return 0;
	}
11231
public function getCurrentMessageCount()
    {
        // Save the current queue flags and setup the queue in passive mode
        $flags = $this->queue->getFlags();
        $this->queue->setFlags($flags | AMQP_PASSIVE);

        // Declare the queue again as passive to get the count of messages
        $messagesCount = $this->queue->declareQueue();

        // Restore the queue flags
        $this->queue->setFlags($flags);

        return $messagesCount;
    }
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);
    }
105284
public function count()
	{
		$count = count($this->jar);
		if ($this->parentEnabled)
		{
			$count += $this->parent->count();
		}
		return $count;
	}
350724
public static function count($message = '') {
		if (!self::$_enabled) {
			return;
		}

		if (self::$ensureByGet && !isset($_GET['debug'])) {
			return;
		}

		/* Get a new ADEBUG object */
		$debug = new THEDEBUG\ADEBUG(array(1));

		/* And its ID (calculated using file and line) */
		$ID = $debug->getID();

		/*
		 * just increment the counter and return if this is		
		 * not the first time called from this file and line,
		 */
		if (isset(self::$counts[$ID])) {
			unset($debug);
			self::$counts[$ID]->variable++;
			return;
		}

		/* Register output on destruction */
		$debug->putOnDestruction = true;

		/* Generate the message or insert the passed one */
		if (empty($message)) {
			$debug->name = sprintf(
				'File %s, Line %s was visited',
				$debug->file,
				$debug->line
			);
		} else {
			$debug->name = $message;
		}

		/* Register callback to add time/s to the counter */
		$debug->addCallback('beforePut', function (&$debug) {
			if ($debug->variable === 1) {
				$debug->variable .= ' time.';
			} else {
				$debug->variable .= ' times.';
			}
		});

		/* Add the debug to the collection of counts */
		self::$counts[$ID] = $debug;
	}
284475
function count()
    {
        try {
            $count = $this->collection->count(
                [
                    'realm' => $this->getRealm(),
                ]
            );
        } catch (\Exception $e) {
            throw new exReadError($e->getMessage(), $e->getCode(), $e);
        }

        return $count;
    }
1057977
public int getMessageCount() throws VehicleServiceException {
        if(mRemoteService != null) {
            try {
                return mRemoteService.getMessageCount();
            } catch(RemoteException e) {
                throw new VehicleServiceException(
                        "Unable to retrieve message count", e);
            }
        } else {
            throw new VehicleServiceException(
                    "Unable to retrieve message count");
        }
    }
762966
public function count()
    {
        $request = $this->createRequestInstance(self::CAT_COUNT, null, null);

        return $this->client->send($request);
    }