pub fn line_count(input: &str) -> usize
Counts logical lines, ignoring a trailing empty line created only by a final line ending.