You can use one of the two forms below. Check out the MSDN blog for more detail explanation.
count(parent::*/preceding-sibling::*) + 1 - assuming all nodes in the parent nodeset are of the same type, otherwise:
count(parent::*/preceding-sibling::<type>) + 1 where <type> is the type of the parent node
http://blogs.msdn.com/asanto/archive/2004/09/08/226663.aspx
Stephanie Cantwell / Test ManagerQdabra® Software / Streamline data gathering to turn process into knowledge