Denote $\mathbb{Z}_q$ be the residue ring of module $q$ with $q=p^r$ be a prime power.
Similar to the question for $k$-dimensional vector spaces over finite fields, we can also define a $k$-dimensional $\mathbb{Z}_q$-submodule in $\mathbb{Z}_q^d$ as the following:
$$ V = \mathrm{span}\{v_1,\dots,v_k\} $$
where $v_1,\dots,v_k \in \mathbb{Z}_q^d$ are linearly independent, namely, if there exist $a_1,a_2,\dots,a_k \in \mathbb{Z}_q$ such that $a_1v_1+a_2v_2+\dots+a_kv_k = 0$ then $a_1=a_2=\dots=a_k = 0.$
Question: How many $k-$ dimensional $\mathbb{Z}_q$-submodule in $\mathbb{Z}_q^d$? And, how many bases for a $k$-dimensional submodule?
The related question for the case of finite fields was done, you can follow via the link: How to count number of bases and subspaces of a given dimension in a vector space over a finite field?