From what Ive read, you can use 'count' in order to determine the number of subform instances..
I was actually at the moment trying to write a script in order to give a number / counter to each of my rows in a dynamic table & stumbled upon the 'count' property .. not that it worked.. but maybe you can work it out .. (If you manage, please let me/us know!)