docs: public int getRemainingMessageCount()
    throws SISessionUnavailableException, SISessionDroppedException,
           SIIncorrectCallException
    {
      if (TraceComponent.isAnyTracingEnabled() && CoreSPILockedMessageEnumeration.tc.isEntryEnabled())
        SibTr.entry(CoreSPILockedMessageEnumeration.tc, "getRemainingMessageCount",
          new Object[] {new Integer(hashCode()), this});
  
      int count = 0;
  
      checkValidState("getRemainingMessageCount");
  
      localConsumerPoint.checkNotClosed();
  
      synchronized(this)
      {
        // If we've reached the end the count is zero
        if(!endReached)
        {
          LMEMessage message;
  
          // If currentMsg is null it means we start from the begining
          if(currentMsg == null)
            message = firstMsg;
          else
            message = currentMsg.next;
  
          while(message != null)
          {
            count++;
            message = message.next;
          }
        }
      }
  
      if (TraceComponent.isAnyTracingEnabled() && CoreSPILockedMessageEnumeration.tc.isEntryEnabled())
        SibTr.exit(CoreSPILockedMessageEnumeration.tc, "getRemainingMessageCount", new Integer(count));
  
      return count;
    }