As Franz Lemmermeyer suggested, one should consider the so-called Ambigous Class Number Formula: you find it, for instance, in Gras' book "Class Field Theory from theory to practice"Theory", II.6.2.3.
It says that if $L/K$ is a finite cyclic Galois extension with group $G$ and if we denote by $Cl_L,E_L$ the class group and the unit group of $L$ respectively (and likewise for $K$), then $$ \vert Cl_L^G\vert=\frac{\vert Cl_K\vert\cdot Ram(L/K)}{[L:K]\cdot [E_K:E_K\cap\mathrm{Norm}_{L/K}(L^\times)]} $$ where $Ram(L/K)$ is the product of all ramification indexes of finite and infinite primes of $K$ in the extension $L/K$.
So, in case $K=\mathbb{Q}$, you get simply $$ \vert Cl_L^G\vert=\frac{Ram(L/\mathbb{Q})}{[L:\mathbb{Q}]}\quad\text{or}\quad \vert Cl_L^G\vert=\frac{Ram(L/\mathbb{Q})}{2[L:\mathbb{Q}]} $$ according as whether $L^\times$ contains or not an element of norm $-1$.
The proof is basically cohomological following the one suggested by Joe Silverman: the term $Ram(L/K)$ comes from fixed ideals in $I_L^G$ and the index of the norm of units of $L$ inside those of $K$ controls some capitulation kernel - but you can look in Gras' book for details.
In case of dihedral extensions, you can look at the question Class groups in dihedral extensions - some sort of Spiegelungssatz?