Xml total children

i would like to find out how to figure out children a node may have.

for example lets say i have this xml doc


<xml>
<data>
<thingy>text</thingy>
<thingy>text</thingy>
<thingy>text</thingy>
<thingy>text</thingy>
</data>
</xml>

how would i figure out that the node data has 4 children?