*Class number* $h(K)$ is exactly the quantitative measure of the failure of unique factorization: by its [definition](http://en.wikipedia.org/wiki/Class_number_%28number_theory%29) it measures "how many more ideas are there compared to numbers". To clarify: decomposition is always unique for ideals, so if the only ideals you have are numbers (that is, $h = 1$), then you don't have any problem decomposing numbers (so, you have PID). Furthermore, the more "leftover" ideals you have (ideal class group), the more possibilities of writing different decompositions of numbers exist. This vague statement can be turned into some precise ones. If you have different factorizations of number $x$, this means the prime ideals in the decomposition $x = \mathfrak p_1\mathfrak p_2\dots\mathfrak p_n$ are grouped in a different way.You can establish from here the bound on the number of possible different factorizations; may be (not sure here) it can be shown to be no more than $C(h)$. Another **theorem** that follows (mentioned by Olivier): $x^h$ must always have a decomposition into true numbers rather then ideals. Indeed, $x^n = \mathfrak p_1^h\mathfrak p_2^h\dots\mathfrak p_n^h$ and you need to use the fact that any element $p$ in abelian group of size $h$ has the property $p^h = 1$.