Standard:
http://www.w3.org/TR/xpath#function-number
number
last
()
Standard excerpt:
The last function returns a number equal to the context size from the expression evaluation context.