optimize advance and advance_bounded for counted iterators