Python - short brute force with DFS
```
class Solution:
    def numberOfComponents(self, p, k):
        props, g, n, res, seen = {i: set(a) for i, a in enumerate(p)}, defaultdict(set), len(p), 0, set()
        {g[i].add(j) or g[j].add(i) for i, j in combinations(range(n), 2) if len(props[i] & props[j]) >= k}
        def dfs(node):
            seen.add(node)
            [dfs(to) for to in g[node] if to not in seen]
        return sum(dfs(i) or 1 for i in range(n) if i not in seen)
```
['Array', 'Hash Table', 'Depth-First Search', 'Python3']