I'm trying to solve the following problem: let $p$ be a prime in a principal ideal domain $R$. Then if $M$ is an $R$-module, I have already shown that $(p^k)M/(p^{k+1})M$ is a module over the field $R/(p)$. Now in the case where
$$M = R^n \oplus R/(p^{s_1}) \oplus \ldots \oplus R/(p^{s_r}),$$
I am trying to compute the dimension of $(p^k)M/(p^{k+1})M$ as a vector space over the field $R/(p)$. But I am not sure of the best way to proceed. Any hints or solutions would be appreciated!