Journey to moon

I tried coding this question but in the dfs_helper function I wrote: count is not getting returned correctly .
Where should I modify my code?

at line no 29
starat counting from 1 because you have already consider 1 element by setting visited[node] = true;

int count = 1;

now it will give correct ans

I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.

On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.