Use a map instead of vector to store line counts.