code: private int countOfMode(boolean data) {
          int count = 0;
          for (Node p = head; p != null; ) {
              if (!p.isMatched()) {
                  if (p.isData != data)
                      return 0;
                  if (++count == Integer.MAX_VALUE) // saturated
                      break;
              }
              Node n = p.next;
              if (n != p)
                  p = n;
              else {
                  count = 0;
                  p = head;
              }
          }
          return count;
      }
docs: Traverses and counts unmatched nodes of the given mode.
  Used by methods size and getWaitingConsumerCount.