pub fn count_words(segment: &str) -> usize