pub fn component_count(graph: &Graph) -> usize
Returns the number of connected components.
graph
Count of connected components