code: public static int size(Iterable<?> iterable) {
      return (iterable instanceof Collection)
          ? ((Collection<?>) iterable).size()
          : Iterators.size(iterable.iterator());
    }
docs: Returns the number of elements in {@code iterable}.