You can use NodeList_Count to determine the size.
1. XmlDocument_SelectNodes returns a XmlNodeList.
2. XmlNodeList_Count receives that XmlNodeList and returns the size (it would be easier if it was a function, but it is an action).
I'll be away for a few days so I can't help you if this isn't enough.