the exercise ask for the number of newlines, but what is the correct answer for strings that without a newline at end?
for example, "line1\nline2" should be count as 2 lines, but it actually has only 1 newline char.
and the funny part is "wc -l" also show "1" for this case.