I'm not clear if you want to match non-blank lines or blank lines (even those that contain only whitespace characters) - you r posting seems to be a little contradictory on this. However the pattern you posted would seem to point towards counting blank lines. On the other hand the title is clear about counting non -blank lines.
What your current pattern will do is to simply match the line-feed characters at the end of a line - it says nothing about what else is (or isn't) on that line.
If you are wanting to count non-blank lines, then these can be defined as a line that contains at least one non-whitespace character.Therefore you could use something like
with the "multiline" option set as you have in your pattern.
Alternatively, to count blank lines (allowing for spaces or tabs) then something like
should do. (By the way the character set contains a space and the tab character - if you want other whitespace characters such as the vertical tab, then add those into the the set definition).