Count regions with DFS | Amazon Interview Question