code: public int getSegmentCount(byte segmentType)
      {
          final List<byte[]> segmentList = getSegmentList(segmentType);
          return segmentList == null ? 0 : segmentList.size();
      }
docs: Returns the count of segment data byte arrays stored for a given segment type.
  
  @param segmentType identifies the required segment
  @return the segment count (zero if no segments exist).