last-position in text%

Returns the last selection position in the editor. This is also the number of items in the editor.