code: public int size() {
          int count = 0;
          for (Node<E> p = first(); p != null; p = succ(p))
              if (p.item != null)
                  // Collection.size() spec says to max out
                  if (++count == Integer.MAX_VALUE)
                      break;
          return count;
      }
docs: Returns the number of elements in this deque.  If this deque
  contains more than {@code Integer.MAX_VALUE} elements, it
  returns {@code Integer.MAX_VALUE}.
  
  <p>Beware that, unlike in most collections, this method is
  <em>NOT</em> a constant-time operation. Because of the
  asynchronous nature of these deques, determining the current
  number of elements requires traversing them all to count them.
  Additionally, it is possible for the size to change during
  execution of this method, in which case the returned result
  will be inaccurate. Thus, this method is typically not very
  useful in concurrent applications.
  
  @return the number of elements in this deque