Hi,
Your code should execute, though rowCount.value will be a string so you will get concatenation, so "11", "111", "1111" etc.
The Designer UI does not support numeric global variables but you can create them by using the XML Source view. You will find something like;
<variables>
<text name="rowCount">1</text>
</variables>
You can then change the text elements to integer, so it looks like;
<variables>
<integer name="rowCount">1</integer>
</variables>
There is more on this in this blog post, Form Variables
An alternative approach would be to use the index property of the repeating subform, this property is incremented for each object with the same name. There is an example of this in another blog Adobe LiveCycle Designer Cookbooks by BR001: Numbering rows in a LiveCycle Designer table or repeati...
Regards
Bruce