Easier than that, use the "index" property in the calculate event of the field you want to number:
$ = (concat("some_static_text", (Table1.Row1.index + 1)))
Also regarding the hidden field, luckily this case has a property you can use already. But if you need to maintain a counter outside of your table, use a variable instead of a hidden field.
Either add "var myVariable = null" to the initialize event of the table's subform (for a local variable) or else create a global variable in the form's properties: File > Form Properties > Variables tab.
Either way, you can pass things to and from the variable for use in your scripts.