code: public static <T> int count(Iterable<T> iterable) {
          int count = 0;
  
          if (iterable != null) {
              Iterator<T> iter = iterable.iterator();
              while (iter.hasNext()) {
                  iter.next();
                  count++;
              }
          }
  
          return count;
      }
docs: Returns the number of elements the iterable contains.
  
  @param iterable the iterable
  @return the element count of the iterable