Say, in Hamiltonian mechanics, we know two constants of motion, $A$ and $B$. It could be proven that the quantity $[A,B]$ is also a constant of motion, where $[A,B]$ denotes the Poisson brackets of $A$ and $B$.
As an example, consider the Hamiltonian: $$H = \frac 1 2 p_R^2 + \frac{p_\phi^2}{2R^2} + \frac A R.$$
H itself obviously is a constant of motion. Further, we can show that the quantity $p_\phi$ and the quantity $C$, given by: $$C = p_Rp_\phi \sin \phi + \frac{p_\phi^2}{R} \cos \phi + A \cos \phi.$$
are both constants of motion. However, how do we know if $[p_{φ},C]$ is another independent constant of motion? Or more generally, how do we know, amongst the 4 constants of motions (H, $p_\phi$, $C$, $[p_{φ},C]$), how many of them are independent?