The iterator adaptor Counting_iterator<Iterator, Value> adds a
counter to the internal iterator of type Iterator and defines
equality of two instances in terms of this counter. It can be used
to create finite sequences of possibly infinite sequences of values
from input iterators.