Let $P$ be a monic irreducible integral polynomial. Let $K=\mathbf Q[X]/(P)$ be the associated number field, $\mathcal O$ be its ring of integers and $R$ be the order $\mathbf Z[X]/(P)$. (In general, $\mathcal O$ and $R$ do not coincide.) Both $R$ and $\mathcal O$ have finite number of ideal classes.