About

Generally, the degrees of freedom is always the number of terms that go into the formula minus one (The intercept).

The degrees of freedom is therefore the number of predictors that have a non-zero coefficients in the model.