Added countNewLines to utils

I want to use this in some of my upcoming fixers.
The same is true for the rest of this class though.