I am concerned about a lack of attention among researchers towards whether (or how) nuisance parameters affect degrees of freedom. For our purposes here we are considering
$$\underbrace{\text{df}}_{\text{Residual Degrees of Freedom}} = \underbrace{m}_{\text{Sample Degrees of Freedom}} - \underbrace{k}_{\text{Model Degrees of Freedom}}$$
rather than other notions such as corrections similar to Bessel's correction or effective degrees of freedom. I often see worded definitions of Model Degrees of Freedom taken to mean "the number of estimated parameters in a model". This worded definition seems to imply that we would include nuisance parameters in this calculation if they are estimated, but often this is not what is done in practice.
Example: DeSeq2 uses a model in which certain dispersion parameters are introduced and estimated, but one of the authors of this package has implied that these parameters are ignored in the calculation of degrees of freedom.
Please (mathematically and with references, if possible) explain why nuisance parameters should or should not be considered in computing model degrees of a freedom.