code: public static <CT, ET> Iterator<Pair<CT, ET>> counted(Iterator<ET> iterator, Range<CT> range) {
          return new ZipShortestIterator<CT, ET>(range.iterator(), iterator);
      }
docs: Creates an iterator yielding values from the source iterator and its
  index.
  
  <code>E.g:
  counted(["a", "b","c"], [0..inf]) -> [(0,"a"), (1, "b"), (2, "c")]
  </code>
  
  
  @param <CT> the counter type
  @param <ET> the element type
  @param iterator the source iterator
  @param range the source range
  @return the resulting iterator