Q:

Procedure for reducing the degrees of freedom of an arbitrary system

I'm trying to understand how it's possible to always reduce the degrees of freedom of a system represented by $n$ coordinates $q_{i}$ for which holds $f(q_{1},...,q_{n})=0.$
For example, let's consider the system represented by
$x+\cos y=5$. How can i show that this system has only 1 degree of freedom?

A:

Your system is currently represented by two coordinates, $x$ and $y$. Without any constraints, any point $(x,y)$ on the plane could be a valid state of your system. But you have a constraint: valid states must obey the equation $x+\cos y=5$. This restricts the space of valid states for your system from a two-dimensional plane to a one-dimensional curve, specifically this curve:

Since your state space is constrained to be one-dimensional, you now only need one parameter to distinguish between different states. This parameter is your one degree of freedom. For example, you might choose to express the state of the system as solely a function of the single parameter $w$, where:
$$y=w$$
$$x=5-\cos w$$

A:

Technically, given a $3N$-dimensional position manifold, it is implicitly assumed that the zero-locus $$\bigcap_{\ell=1}^m\{f_{\ell}=0\}$$ for the $m$ independent holonomic constraints is an embedded submanifold, which necessarily have dimension $3N-m$. Hence the constrained system has $3N-m$ generalized coordinates/degrees of freedom. 
See also this related Phys.SE post.

