XSLT » XPath Core Functions » count

Syntax:
number = count(node-set)

The count function counts and returns the number of nodes in a node-set.