Do until runs its child actions and then checks whether its condition is true. Unlike an array loop, it repeats according to a stopping rule. Something inside the loop must change the state tested by that rule. A count limit bounds the number of iterations, but it does not turn an unreachable condition into a successful result.
Initialize the state before the loop and choose a limit that matches the task. These exercises use a numeric counter to make the execution trace easy to follow. Workplace polling also needs sensible delays, timeouts and service limits; this local simulator doesn't wait between checks or contact a remote service. Inspect the final variable and iteration count. An off-by-one condition can stop too early or hit the limit even when every increment action succeeded.