Question: Let $n$ be a positive integer and considere the ring $\mathbb Z\_n$ of the residual classes modulo $n$. My intuition tells me that there is no two distinct ideals of $\mathbb Z\_n$ with the same number of elements. Is this true?

Answer: 
If $I$ is an ideal of $\mathbb{Z}\_n$ whit $d$ elements, then it is generated by $n/d$ i.e $I=(n/d)$, hence the uniqueness.
The key is the homomorphism theorem: if $f\colon R\to S$ is a surjective ring homomorphism, then $f$ induces a bijection between the set of ideals in $R$ containing $\ker f$ and the set of ideals of $S$. The bijection is simply given by
$$
f^{\to}\colon I \mapsto f^{\to}(I)=\{f(r):r\in I\}
$$
with inverse
$$
f^{\gets}\colon J\mapsto f^{\gets}(J)=\{r\in R:f(r)\in J\}
$$
(Note: $f^{\to}(I)$ and $f^{\gets}(J)$ are most often denoted $f(I)$ and $f^{-1}(J)$, but I find the notation with arrows less confusing.)

Moreover, for $I$ an ideal of $R$ containing $\ker f$ we have $R/I\cong S/f^{\to}(I)$; for $J$ an ideal of $S$, we have $S/J\cong R/f^{\gets}(J)$.

In the case of the canonical homomorphism $\pi\colon\mathbb{Z}\to\mathbb{Z}\_n$, we know that $\ker \pi=n\mathbb{Z}$ and we also know *all* ideals of $\mathbb{Z}$ to be of the form $m\mathbb{Z}$, for a unique $m\ge0$. The ideals of $\mathbb{Z}$ containing $n\mathbb{Z}$ are those of the form $m\mathbb{Z}$ such that $m$ divides $n$.

This said, if $J$ is an ideal in $\mathbb{Z}\_n$, we have $J=f^{\to}(m\mathbb{Z})$ and $S/J=\mathbb{Z}/m\mathbb{Z}$ which has exactly $m$ elements and no other quotient of $\mathbb{Z}\_n$ can have the same number of elements.

Apply Lagrange's theorem (to the additive group of $\mathbb{Z}\_n$) and you're done.