Popup formula question

I’m trying to set up a TEO to let the user edit the contents of a popup menu item. When I get the contents of the formula for the popup and display it with a message it shows what I expect. However, when I do a linecount( on it it comes back with a “1”. There are actually 7 lines of text in the popup formula. Why would the linecount( come back as 1 instead of 7? Here is my code:
local X
X = objectinfo(“formula”, “SanctionPaid2”, “Player Info Form”, “Players”)
message X
message linecount(X)

Here are the two messages:

and

The problem is that the linecount( function only checks for carriage returns and your list is obviously using line feeds. You can either change the line feeds with carriage returns or use the arraysize( function with lf() as the separator.

message linecount(lftocr(x))
message arraysize(x,lf())

Thank you sir