fixed a counting of rows for files with windows end of line
added test to count lines in files with different line breaks
reset global variables at the start of the file parsing