Use use ssget "x" function to collect all text objects on the layer, then iterate through them, creating a list. Then use the LAST function to find the highest value. I'm not going to write this for you, you'll have to do it yourself. I will help if you should so ask me for it nicely.