Depending on what you're trying to acheve you can use the count function instead:
count(preceding-sibling::my:<RepeatingGroupNodeName>) + 1
For example, this can be used to give a repeating table alternating-color rows
David Airapetyan / Software Services ArchitectQdabra® Software / Streamline data gathering to turn process into knowledge