Return the number of weakly connected components in G.
See also
connected_components()
Notes
For directed graphs only.