If the iterations do not affect each other, then you can put a breakpoint at the "do something" line, execute, and when it stops, assign the desired value to count. That will only affect until the end of that one iteration, and the next loop iteration through, count will become 2 no matter what you set it to. But you can then manually set to 2, and keep doing that.
But what you probably need is to set a conditional breakpoint. Right-click the grey bubble to the left of the line, and choose Set Conditional Breakpoint. In the window that comes up, enter
and press return. Now execute the code. It will run the first 26 iterations and then stop when it gets to iteration 27.