Loop counter increment to detect infinite loop.