move Counter class inside of LineParser where it is used