Counting lines