fn:count( $arg as item()*, [$maximum as xs:double?] ) as xs:integer
Returns the number of items in the value of $arg.
Returns 0 if $arg is the empty sequence.
Assume: $seq1 = ($item1, $item2) $seq3 = (), the empty sequence Then: fn:count($seq1) returns 2. fn:count($seq3) returns 0. Assume $seq2 = (98.5, 98.3, 98.9). Then: fn:count($seq2) returns 3. fn:count($seq2[. > 100]) returns 0.
Stack Overflow: Get the most useful answers to questions from the MarkLogic community, or ask your own question.