I am reading about local class field theory here https://math.mit.edu/classes/18.785/2015fa/LectureNotes24.pdf and in the end the author mentions an application to count the number of Galois extensions of $\mathbb{Q}_p$ with degree $p$ for an odd prime $p$. It works as below.
By local class field theory, it suffices to count the number of open subgroups of $\mathbb{Q}_p^\times$ with index $p$. Since the extension has degree $p$, its norm subgroup must contain ${\mathbb{Q}_p^\times}^p$ so we just need to count the number of subgroups of $\mathbb{Q}_p^\times/{\mathbb{Q}_p^\times}^p$ with index $p$. The projection $\mathbb{Q}_p^\times\to\mathbb{Q}_p^\times/{\mathbb{Q}_p^\times}^p$ is continuous and the latter is discrete so this makes sure that we indeed get the open subgroups.
$\mathbb{Q}_p^\times\cong\mathbb{Z}\times\mathbb{Z}_p^\times\cong\mathbb{Z}\times\mathbb{Z}_p\times\mathbb{Z}/(p-1)$, so $\mathbb{Q}_p^\times/{\mathbb{Q}_p^\times}^p\cong(\mathbb{Z}/p)^2$. Our job is now just counting number of cyclic order $p$ subgroups of $(\mathbb{Z}/p)^2$. There are $\frac{p^2-1}{p-1}=p+1$ of them.
I wonder if there is application like this for number fields? Maybe we can classify all abelian extensions of a number field by looking at the quotient of its idele groups. But I have no clue how. The group of ideles is a direct limit and I try to pass the direct limit to the quotient, but I am not sure how precisely I work.
Edits: is the claim below true? The number of finite abelian Galois extension of $\mathbb{Q}$ of degree $n$ and discriminant dividing $D$ is same as the number of index $n$ subgroups in $\left( \mathbb{Z} / D \mathbb{Z} \right) ^{\times}$.
I would like to give a tentative answer to your question, elaborating the comments.
Let us do the example of $\mathbb{Q}$ first. As there are infinitely many extensions of degree $n$, what you have done is kind of impossible. But if we take a discriminant $D$, then there are finitely many extension. Now, as suggested in the comments that the finite abelian Galois extensions are in one-to-one correspondence with Hecke characters (here Dirichlet characters), the number of finite abelian Galois extension of $\mathbb{Q}$ of degree $n$ and discriminant dividing $D$ is same as the number of index $n$ subgroups in $\left( \mathbb{Z} / D \mathbb{Z} \right) ^{\times}$.
Now, question is "why discrimininant?". In the case of local field $\mathbb{Q}_p$, there is only one prime. We are using discriminant to bound the ramification in the case of number fields as there are infinitely many primes.
To answer the same question in general is difficult. Even for local field case, the structure of $\mathcal{O}^\times$ (the unit group of the ring of integers) is difficult to understand. So understanding ramified extensions is tough.
A small remark for the result for $\mathbb{Q}$ can also be achieved using Kronecker-Weber theorem.