Instead of using a line counter, this code could be written by reading every line once using the ```readline()```, which is probably better practice. This not necessarily a high priority for this pull request though.