code: public static int sizeOf(Iterable<?> iterable)
      {
          if (iterable instanceof Collection)
          {
              return ((Collection<?>) iterable).size();
          }
          if (iterable instanceof RichIterable)
          {
              return ((RichIterable<?>) iterable).size();
          }
          return Iterate.count(iterable, Predicates.alwaysTrue());
      }
docs: Returns the size of an iterable.
  In the case of Collections and RichIterables, the method size is called.
  All other iterables will force a complete iteration to happen, which can be unnecessarily costly.