Major revision on logic. Still not producing the right result. counting each line instead of each word.