Count all siblings while retaining the target's same-tag position so first siblings and ancestors receive a positional qualifier when needed. Add 40 parameterized regression cases for CSS and XPath round trips.