Loop certain number of times then do action

What is connected on relayPin?