Count the Number of Complete Components | Leetcode 2685