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