how to count sub elements

Jul 3, 2012 at 1:36 PM

Having a json structure like this
<artistmatches>
<artist>
<name>
<nick>
<age>
</artist>
</artistmatches>
JToken["artistmatches"]["artist"].Count() return 3, because of 3 sub elements (name, nick, age) of artist jtoken
I need to have the real count of artist subnode, which in the case above should return 1.
So, how to do this ?