what was/is motivation and short history/story behind "class number"? We know that there are some formula to calculate class number of a quadratic field $Q(\sqrt{d})$, where $d\in Z-\{0,1\}$, in terms of Dirichlet L-functions.
Please correct me if I am wrong: for example one motivation to build $Q(\sqrt{d})$ is to define a field (extension of $Q$) in which the equation $x^2-d=0$ is solvable.
I looked at some books and I did not see a simple explanation of what is a class number (without using the Ideals language) in a simple way. I saw some explanation in "An introduction to number theory Book by Harold Stark", but it was very short.
I would like to know a little bit more about what was/is the motivation to define class number of a quadratic field and what are its applications? what is the use of knowing that a class number of a field is 1,2,...?
giving some references would be appreciated as well.
 A: Let $K/\mathbb{Q}$ be a finite extension. The basic idea for defining the class number is to determine "whether unique factorisation fails in $\mathcal{O}_K$". In the sense that, when the class number is $1$, $\mathcal{O}_K$ has unique factorisation. This, of course, is quite an interesting question in itself.
One application to a concrete question is the following.

Suppose that $n$ is a squarefree positive integer. When can we may write a prime $p$ as
$$ p = a^2 + nb^2 $$
for some $a, b \in \mathbb{Z}$?

Suppose that $n \not\equiv 3 \mod 4$ (this is basically to avoid the case that $\mathbb{Z}[\sqrt{-n}]$ is not the ring of integers of $\mathbb{Q}(\sqrt{-n})$). Suppose that the class number of $K = \mathbb{Q}(\sqrt{-n})$ is $1$, and let $p$ be a prime not dividing $4n$. Then we may write $p$ as $a^2 + nb^2$ if and only if $-n$ is a square mod $p$.
One consequence of this is a result of Fermat (proved by Euler) that $p = a^2 + b^2$ if and only if $p \equiv 1 \mod 4$.
As requested I tried to avoid using the language of ideals, however the above paragraph seems much more natural if I say "let $p$ be unramified in $K/\mathbb{Q}$, then $p = a^2 + nb^2$ if and only if $p$ splits in $K$". Moreover I don't think one can really avoid such language if we want to deal with class numbers greater than 1 (although I would love to be proven wrong).
