Independent degrees of freedom of dynamical systems