count
The number of items in a sequence
Description
The fn:count function returns the number of items in a sequence, as an xs:integer.
Parameters |
Description |
---|---|
arg:integer() |
the sequence of items to count |
Examples
XPath |
Results |
---|---|
count( (1, 2, 3) ) |
3 |
count($ordDoc//item) |
6 |
count(distinct-values($ordDoc//item/@num)) |
4 |
count( (1, 2, 3, () ) ) |
3 |
count( () ) |
0 |
See Also
sum.