size


size(collection)


Returns the number of items in the collection.


Where the collection is a list, or a set of nodes retrieved with a search expression.

Where the collection is a string, the number of characters is returned.

To determine the type of the collection, you can use the datatype function