What is the proper syntax for representing the value of a variable in a repeat dialog?

In a macro setting use the following:

%%[Variable name TE#CountingVariable]%%

In the event you are testing a condition, use the following:

[Variable name TE#CountingVariable]="valuehere"