the (weighted) number of connected components of G
Description
This computes the (weighted) number of connected components of a graph. The weights are all one if WeightMethod='BEI' is chosen and if WeightMethod='PBEI', then bipartite components count twice.