Count of messages in all queues.

@return int
543772
public function count()
    {
        $counts = array_map(function(QueueInterface $queue) {
            return $queue->count();
        }, $this->getQueues());

        return array_sum($counts);
    }
632405
public function pop()
    {
        $keys = array_keys($this->queues);

        for ($this->queueCounter; isset($keys[$this->queueCounter]); $this->queueCounter++) {
            $queue = $this->queues[$keys[$this->queueCounter]];

            $message = $queue->pop();

            if ($message !== null) {
                $this->queueCounter++;
                $this->processedMessages++;
                return $message;
            }

            // After the last queue has been popped
            if ((count($this->queues) -1) === $this->queueCounter) {
                $this->queueCounter = 0;

                if ($this->processedMessages === 0) {
                    return null;
                }

                $this->processedMessages = 0;
            }
        }

        return null;
    }
554743
public function countMeaningfull()
    {
        $res = 0;

        foreach ($this->fragments as $value) {
            if (null === $value) {
                break;
            }

            $res++;
        }

        return $res;
    }
817702
public function count($type = null)
    {
        if ($type) {
            return count($this->get($type));
        }

        $count = 0;
        foreach ($this->get() as $type => $messages) {
            $count += count($messages);
        }
        return $count;
    }
542020
public function measuredQueues()
    {
        $queues = (array) $this->connection()->smembers('measured_queues');

        return collect($queues)->map(function ($class) {
            return preg_match('/queue:(.*)$/', $class, $matches) ? $matches[1] : $class;
        })->all();
    }
552941
public function countTotal()
    {
        $em = $this->getDoctrine()->getManager();

        $qb = $em->getRepository('AsmTranslationLoaderBundle:Translation')
            ->createQueryBuilder('tl')
            ->select('COUNT(tl)');

        return $qb->getQuery()->getSingleScalarResult();
    }
70836
public function getMessageCount()
    {
        if ($this->getResultCode() === self::RC_SUCCESS_NO_MESSAGES) {
            return 0;
        }

        $node = $this->getFirst('//epp:epp/epp:response/epp:msgQ');
        if ($node === null) {
            return null;
        }

        return (int) $node->getAttribute('count');
    }
430262
public int getNumberOfActiveMessages()
  {
    if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) 
      SibTr.entry(tc, "getNumberOfActiveMessages");
    int activeMessages = 
      (int)_sourceStream.countAllMessagesOnStream();
    if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) 
      SibTr.exit(tc, "getNumberOfActiveMessages", new Integer(activeMessages));      
    return activeMessages;
  }
4341
public function toMessage()
    {
        $m = new Message();
        foreach ($this->queueStatus as $action) {
            $m->push($action['action']);
            $m->push($action['queue']);
            $m->push($action['busy']);
            $m->push($action['available']);
        }

        return $m;
    }
1014889
public function countMessages($flags = null)
    {
        if ($flags === null) {
            return count($this->_files);
        }

        $count = 0;
        if (!is_array($flags)) {
            foreach ($this->_files as $file) {
                if (isset($file['flaglookup'][$flags])) {
                    ++$count;
                }
            }
            return $count;
        }

        $flags = array_flip($flags);
           foreach ($this->_files as $file) {
               foreach ($flags as $flag => $v) {
                   if (!isset($file['flaglookup'][$flag])) {
                       continue 2;
                   }
               }
               ++$count;
           }
           return $count;
    }
619158
public function getNbResults(): int
    {
        if ($this->nbResults !== null) {
            return $this->nbResults;
        }

        return $this->nbResults = $this->notificationService->getNotificationCount();
    }
695417
public function getCountAll()
    {
        if ($this->sync && $this->countAll !== null) return $this->countAll;
        
        $query = clone $this->query;
        $query->resetQueryPart('orderBy')
              ->setMaxResults(null)
              ->setFirstResult(null)
              ->select('COUNT(1)');
			  
        $this->fixWhere($query);
                            
        $stmt = $query->execute();  
        if ($stmt->rowCount() > 1) {
            $this->countAll = $stmt->rowCount();
        } 
        else {
            $this->countAll = $stmt->fetchColumn();
        }
        
        return $this->countAll;  
    }
34746
public function tick(): int
    {
        $count = 0;
        $time = microtime(true);
        
        while (!$this->queue->isEmpty()) {
            list($timer, $timeout) = $this->queue->top();

            if (!$this->timers->contains($timer) || $timeout !== $this->timers[$timer]) {
                $this->queue->extract(); // Timer was removed from queue.
                continue;
            }

            if ($this->timers[$timer] > $time) { // Timer at top of queue has not expired.
                return $count;
            }

            // Remove and execute timer. Replace timer if persistent.
            $this->queue->extract();

            if ($timer->isPeriodic()) {
                $timeout = $time + $timer->getInterval();
                $this->queue->insert([$timer, $timeout], -$timeout);
                $this->timers[$timer] = $timeout;
            } else {
                $this->timers->detach($timer);
            }

            // Execute the timer.
            $timer->call();

            ++$count;
        }
        
        return $count;
    }
437756
public function getCount()
    {
        if ($this->_count !== null) {
            return $this->_count;
        }

        while ($this->_hasMore) {
            $this->fetchOutstanding();
        }

        return $this->_length;
    }
762966
public function count()
    {
        $request = $this->createRequestInstance(self::CAT_COUNT, null, null);

        return $this->client->send($request);
    }
622356
public function getNewNotificationCount()
    {
        return $this->getUnreadNotifications()->filter(function ($notification) {
            return $notification->created_at > $this->read_notifications_at ?: 0;
        })->count();
    }
790346
public function getUnreadMessageCount()
    {
        $messageMapper = ($this->container->dataMapper)('MessageMapper');
        $count = $messageMapper->findUnreadCount();

        return ($count === 0) ? null : $count;
    }