Counting nodes from XML

Hi,

Let’s say I have a XML file with three types of nodes; type1, type2 and type3.
How do I count the number of nodes named type1?

Thanks :cons: