lineCount

Returns the number of lines in this string, treating \n, \r\n, and \r as line breaks.

An empty string counts as one line; the result equals the number of line breaks plus one.