Firstly, degrees of freedom is the NUMBER of general coordinates required to describe the EOM. Simply saying "Generalised coordinates" is a bit vague.
Secondly, not all the coordinates are required. Under most instances, we assume that bodies are rigid, meaning that particles are constrained to each other, and we only need to consider the body as a whole. Otherwise we would need a set of coordinates to describe each molecule (if the molecules are rigid of course).
In addition to that, there are constraint forces which furthermore eliminates degree of freedom. (e.g if a particle is on the table, with no extra vertical forces other than gravity, then you only need two coordinates rather than three, when the particle is free to move everywhere).
Usually, just try to count how many general coordinates you need at least to describe the free body, then take away the holonomic constraints, as you have mentioned, so that you don't have to deal with number on the order of Avogadro constant.