Loop certain number of times then do action

Why wait.
You can try it now.

Still not clear what comes from the PLC relay. Is it just a contact closure to ground or does it actually output 24V and 0V?
You may need actually need apullup and not a down