Get the number of items already received from the server.

@return Nsumber of received items
327819
public int getNumberAvailable() {
        int result = 0;
        for (int i = 0; i < data.size(); i++) {
            if (data.get(i) != null) {
                result += 1;
            }
        }
        return result;
    }
1217325
public int getNumWeights() {
    if (weights == null) return 0;
    int numWeights = 0;
    for (double[] wts : weights) {
      numWeights += wts.length;
    }
    return numWeights;
  }
413384
public function nextItem()
    {
        if ($this->batch === null) {
            $this->batch = [];
        }
        
        //If no items in batch, and we have a resumptionToken or need to make initial request...
        if (count($this->batch) == 0 && ($this->resumptionToken or $this->numRequests == 0)) {
            $this->retrieveBatch();
        }

        //if still items in current batch, return one
        if (count($this->batch) > 0) {
            $this->numProcessed++;

            $item = array_shift($this->batch);
            $this->currItem = clone $item;
        } else {
            $this->currItem = false;
        }

        return $this->currItem;
    }
156386
public function count()
    {
        return $this->list->count() +
            count($this->firstItems) +
            count($this->lastItems);
    }
396495
public long getNumberOfCurrentRequests()
  {
    if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
      SibTr.entry(tc, "getNumberOfCurrentRequests");
    //request, value, rejected and accepted messages are all counted
    long returnValue = _aoStream.getNumberOfRequestsInState(TickRange.Requested);
    returnValue+=_aoStream.getNumberOfRequestsInState(TickRange.Value);
    returnValue+=_aoStream.getNumberOfRequestsInState(TickRange.Rejected);
    returnValue+=_aoStream.getNumberOfRequestsInState(TickRange.Accepted);
    if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
      SibTr.exit(tc, "getNumberOfCurrentRequests", new Long(returnValue));
    return returnValue;     
  }
1167184
public int getRemainingMessageCount() 
  throws SISessionUnavailableException, SISessionDroppedException,
         SIIncorrectCallException
  {
    if (TraceComponent.isAnyTracingEnabled() && CoreSPILockedMessageEnumeration.tc.isEntryEnabled())
      SibTr.entry(CoreSPILockedMessageEnumeration.tc, "getRemainingMessageCount", this);
          
    checkValidState("getRemainingMessageCount");
          
    _localConsumerPoint.checkNotClosed();
    
    int remaining = 0;
    
    if(!_seenSingleMessage)
    {
      remaining = 1;
    }
    
    if (TraceComponent.isAnyTracingEnabled() && CoreSPILockedMessageEnumeration.tc.isEntryEnabled())
      SibTr.exit(CoreSPILockedMessageEnumeration.tc, "getRemainingMessageCount", 
        new Integer(remaining));    
      
    return remaining;
  }
903083
function () {
            var delegate = THIS[ this.hash ],
                i,
                len = delegate.activePointersLists.length,
                count = 0;

            for ( i = 0; i < len; i++ ) {
                count += delegate.activePointersLists[ i ].getLength();
            }

            return count;
        }
337177
private static int checkNumItems(final HttpServletRequest request,
			final ReadResponse response) {
		final String sNumItems = request
				.getParameter(ProtocolConstants.Parameters.Read.NUM_ITEMS);
		if (sNumItems != null) {
			int numItems;
			try {
				numItems = Integer.valueOf(sNumItems);
				if (numItems > 0) {
					return numItems;
				}

				response.numItemsInvalid("Please provide a number greater than zero.");
			} catch (final NumberFormatException e) {
				response.numItemsInvalid("\""
						+ sNumItems
						+ "\" is not a number. Please provide a number such as \"15\" to retrieve that number of items.");
			}
		} else {
			response.numItemsMissing();
		}

		return 0;
	}
307981
final int getCount() {
        int count = 0;
        Attribute attr = this;
        while (attr != null) {
            count += 1;
            attr = attr.next;
        }
        return count;
    }
1080163
public int count() {
        int n = 0;
        for (ConcurrentMap<?, ?> bag : registry.values()) {
            n += bag.size();
        }
        return n;
    }
701855
public int getNumObsFeats() {
        int count = 0;
        for (FactorTemplate ft : fts) {
            count += ft.getAlphabet().size();
        }
        return count;
    }
292651
@Nonnull
  @ReturnsMutableCopy
  public ICommonsList <DATATYPE> next ()
  {
    if (!hasNext ())
      throw new NoSuchElementException ();

    // Not for the very first item, as the first item is the original order
    final boolean bFirstItem = m_bUseLong ? m_nCombinationsLeft == m_nTotalCombinations
                                          : m_aCombinationsLeft.equals (m_aTotalCombinations);
    if (!bFirstItem)
    {
      final int nElementCount = m_aElements.length;
      final int nSlotCount = m_aIndexResult.length;

      int i = nSlotCount - 1;
      while (m_aIndexResult[i] == (nElementCount - nSlotCount + i))
      {
        i--;
      }
      m_aIndexResult[i]++;
      final int nIndexResultI = m_aIndexResult[i];
      for (int j = i + 1; j < nSlotCount; j++)
      {
        m_aIndexResult[j] = nIndexResultI + j - i;
      }
    }

    // One combination less
    if (m_bUseLong)
      m_nCombinationsLeft--;
    else
      m_aCombinationsLeft = m_aCombinationsLeft.subtract (BigInteger.ONE);

    // Build result list
    final ICommonsList <DATATYPE> aResult = new CommonsArrayList <> (m_aIndexResult.length);
    for (final int nIndex : m_aIndexResult)
      aResult.add (m_aElements[nIndex]);
    return aResult;
  }
1126153
public function getItemsCount()
    {
        $itemsCount = 0;

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

        return $itemsCount;
    }
1272134
public int getCount(Object o) {
    int[] nums = (int[]) cset.get(o);   
    if (nums == null ) {
      return(0);
    }
    else {
      return(nums[0]);
    }
  }
614605
public function count()
    {
        if ($this->count == null) {
            $this->count = $this->itemProvider->count($this->method, $this->criterias());
        }

        return $this->count;
    }
236890
public int getChildCount()
    {
        if(!m_bHasLoaded)
        {
            NodeData data = (NodeData)this.getUserObject();
            if ((data == null) || (!data.isLeaf()))
                this.loadChildren();
        }
        return super.getChildCount();
    }
1021404
public int getNumberOfQueuedMessages()
  {
    //this value is the number of requests in the AOValue state
    int count = 0;
    
    NonLockingCursor cursor = null;
    
    try
    {
      cursor = _aoStream.itemStream.newNonLockingItemCursor(null);
      cursor.allowUnavailableItems();
      AOValue item = (AOValue)cursor.next();
      while(item != null)
      {
        count ++;
        item = (AOValue)cursor.next();
      }      
    }
    catch (MessageStoreException e)
    {
      FFDCFilter.processException(
        e,
        "com.ibm.ws.sib.processor.runtime.RemoteConsumerTransmit.getNumberOfQueuedMessages",
        "1:340:1.44", 
        this);
      SibTr.error(tc, "INTERNAL_MESSAGING_ERROR_CWSIP0002",
        new Object[] { "com.ibm.ws.sib.processor.runtime.RemoteConsumerTransmit.getNumberOfQueuedMessages", 
                       "1:344:1.44", 
                       SIMPUtils.getStackTrace(e) });
      count = -1;
        
    }
    finally
    {
      if (cursor != null)
        cursor.finished();     
    }
    
    if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
      SibTr.exit(tc, "getNumberOfQueuedMessages", new Integer(count));
    return count;
  }