Improved Utility Functions

I want to use this in some of my upcoming fixers.
The description says "Count the number of newline characters in a string.", not count the number of lines.