Easy way to count line numbers is to do a search in your project of line endings.
In other words search for reg expression, "\n" and the number of occurrences is the number of lines in your project. Yes it counts empty lines. Who knows the rules for that? No one. So go with it.