use abstractiterator, add counter