Implement XPathNodeCounter