Adds iteration counter.