Loop certain number of times then do action

So there is not a pulldown resistor keeping relayPin LOW when the relay is not energised