docs: public long countAllMessagesOnStream()
    {
      if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
        SibTr.entry(tc, "countAllMessagesOnStream");
  
      long count=0;
      _targetStream.setCursor(0);
      // Get the first TickRange
      TickRange tr = _targetStream.getNext();
      while (tr.endstamp < RangeList.INFINITY)
      {
        if (tr.type == TickRange.Value)
        {
          count++;
        }
        if (tr.type == TickRange.Requested)
        {
          // If we are an restarted IME (gathering) then we may have to restore msgs from the
          // DME which were previously Value msgs in this stream. We need to count any re-requests
          // in our count as they contribute to the total.
          if (((AIRequestedTick)tr.value).getRestoringAOValue() != null)
            count++;
        }
        tr = _targetStream.getNext();
      } // end while
  
      if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
        SibTr.exit(tc, "countAllMessagesOnStream", Long.valueOf(count));
      return count;
    }