Controlling the loop with a static variable counter

how to controlling the loop with a static variable counter.

Can someone send me an example?

counter.xaml (10.9 KB)

See here