my $count = $doc->findvalue("count(//category)"); [download]
In reply to Re: XML::LibXML count nodes by choroba in thread XML::LibXML count nodes by elgato