How can I make it switch proxy after a certain amount of loops

I want to be able to switch to a new proxy after every 5 loops, how can i do this the easiest way. I dont want to switch proxy after every loop but rather after 5 loops.

Use the times 5 command for the loop:

times 10000
setProxy to new value
times 5
…do proxy stuff
end
end