To loop over a command some number of times, you can use a Loop command with Javascript Expressions.
1. Click the plus button of the parent command to the one(s) you want to loop.
2. Under Advanced, add a Loop command.
3. Drag and drop the commands you want to loop under the new Loop command.
4. For the In option of the Loop command, input $createArray(#) to repeat the loop # times.