I found the production version of _FileCountLines() improperly handles blank lines at the end of a file. It rarely reports the same number of lines shown in notepad or SciTE.
This modified function is 60-70% faster, uses half the memory (allowing it to read larger files and less likely to spit ou...