See if this helps:
In the Prompt, I'm asking for the value of the variable "Repeat Count". Then I use it in a "Repeat" action.
1) The fact that "Repeat Count" is orange in the "Repeat" action just means the variable doesn't have a value yet. You can ignore the color. It'll be fine when you run it. Same for the red "invalid" - that will go away once "Repeat Count" actually has a value, like it will when you run the macro.
2) When you first insert the "Repeat" action, it will look like this:
Just put your cursor into the field with the "1", delete the "1", and type (or paste) the name of the variable. The Action will change to look like this:
Hope this helps. Let me know if you still have questions.