Can anyone please explain me how degree of freedom are calculated in this part? I'm unable to arrive at the answer.