made line-counter.py simpler