Note that, somewhat counter-intuitively, what "wc -l" counts is the number of newline characters:
$ printf 'foo\nbar' | wc -l
1
There are arguably two lines in the input, but the result is 1.Without this (mis)feature, "wc -l" would be more difficult to parallelize.