Returns a line count for a string