Another way to get the number of joined sets among several nodes.