The last function returns a number equal to the context size from the expression evaluation context.
last
last()
An integer equal to the context size from the expression evaluation context.
XPath 1.0 4.1
Supported.