test-lib: introduce test_line_count to measure files