When I use the "Filter Variable with Line Count" action, something odd happens. The filter always returns a value equal to the number of carriage returns in the variable, unless the variable contains zero carriage returns. I would expect an empty variable to return a line count of zero, but instead it returns a line count of one, as I think you can witness from this image... (ie, notice that the condition evaluates as TRUE, meaning "Data" contains no CR's, yet the Filter action still returns a line count of "1")
Notice how the empty variable "Data" above returns a line count of size "1". But if you add a single carriage return to the same variable, it still returns a line count of one. It took me an hour to troubleshoot this behavior, as I never imagined an empty variable could possibly have the same line count as a variable with one line.
This is difficult for me as I'm trying to count how many lines come back from a shell command, and in my way of thinking, "no lines of text should constitute a different line count than one line of text". But instead this action returns the same value "1" whether the command returns 0 or 1 line of output. Is this behavior actually desirable?
As a secondary proof that the value should return 0, I observe that the following shell command returns a value of 0, not 1:
ls | grep ZZZZZ | wc -l
If I'm wrong on anything here, I apologize in advance. I have made mistakes before.