CountLines()

Example 1:

For an object (or variable) named myText, use the following syntax:

var numOfLines = CountLines(myText)

Example 2:

var numOfLines = CountLines("Line1\nLine2\nLine3")