Added countNewLines to utils

I want to use this in some of my upcoming fixers.
I'll add descriptions for all the methods. :)