pub fn count_pattern(output: &str, pattern: &str) -> usize
Count lines matching a pattern in the output.