countComponents = function(n, edges) {
    return new UnionFind(n, edges)
        .connectedComponents;
}
https://leetcode.com/problems/number-of-connected-components-in-an-undirected-graph/
Time O(E * a(N)) | Space O(V)
@param {number} n
@param {number[][]} edges
@return {number}