Three lessons from this problem:
1. Not all graph connectivity problems need MST. Sometimes counting components is enough
2. Sometimes you need to count and connect components without considering weights
3. Union-Find is useful for component problems beyond MST If you solved this, you understand how to use Union-Find beyond MST algorithms. This skill appears in many graph problems. Component detection and merging is a core graph technique.