For a Text object named myText, to find the number of characters on the first line of text, use the following syntax:
var numOfChars = myText.LineLength(0)