Track the number of iterations required to arrive at the answer.