code: public static int count(Iterable it) {
          int n = 0;
  
          for(Object v: it) {
              if(v != null) {
                  ++n;
              }
          }
  
          return n;
      }
docs: Returns the number of not-null items in the iteratable.
  
  @param it
  @return