Applications of class number There is the notion of class number from algebraic number theory. Why is such a notion defined and what good comes out of it?
It is nice if it is $1$; we have unique factorization of all ideals; but otherwise?

Well, class field theory states that the class number is the degree of the largest everywhere-unramified abelian extension of a number field (namely, the Hilbert class field).  But class field theory really says a lot more: it says that there's an isomorphism between the Galois group and the ideal class group. And in general, for any abelian extension $L/K$, there's an isomorphism between $G(L/K)$ and a certain "generalized ideal class group" of $K$ where you quotient by ideals that are norms from $L$.  This can be stated somewhat more elegantly using ideles.
But, you asked about the class number. In class field theory, it's difficult (to my knowledge) to prove directly that the Artin reciprocity map defined from ideals to the Galois group is an isomorphism. You can show that it is surjective and injective, however; to do this, you have to estimate the order of these generalized ideal class groups, which you can do using either analytic (L-function) methods or algebraic (e.g., using the Herbrand quotient) methods. So this is where the size and seemingly "decategorified" properties (like the order) become more important than the groups themselves: the proofs.
