pub(crate) fn count_newlines(input: &str) -> usize