counter to count iterations