code: public static function size(IteratorAggregate $iterable) : int
      {
          if ($iterable instanceof Countable) {
              return $iterable->count();
          }
          return Iterators::size(Iterators::from($iterable->getIterator()));
      }
docs: Returns the number of elements in iterable.
  
  @param IteratorAggregate $iterable
  @return int