I'm getting a result that is a bit off. You probably need to account for `\n` / newline in your control flow logic to get the correct count. Also, try looking into the split() method (under String.prototype). You may find another way of doing this helpful.