do you just want the ordering like 1,2,3 for the repeating values or do you eant assign a value.
If it is just the ordering then you can set the default value to be
count(../preceding-sibling::*) + 1
Here you need to check "Update this value when the result of the formula is recaliculated."
if you dont want the numbers to be in order then you can use the following
count(../preceding-sibling::*) + 1 + count(../following-sibling::*)
Here you need to uncheck "Update this value when the result of the formula is recaliculated."