What if there are multiple lines here and count (or max below) gets set twice? `readLine` may not be appropriate in this case.