Sorry for being so brief Jason.
When I tried using the code that you provided I get an error (red exclamation point) in the "SERVER BEHAVIORS" panel. The page will function properly even though the error is showing in the server panel. Maybe it's okay to have the error, I don't know.
In the server behaviors panel when I use the default expression:
$RepeatSelectionCounter_1_Iterations = "5";
server behaviors displays:
Repeat Selection (WADAimages, 5)
When I use the expression:
$RepeatSelectionCounter_1_Iterations = "".$imagesPerRow."";
server behaviors displays:
! Repeat Selection (All records)
Please let me know if there is any other information that would be helpful.
Thanks