Observe $\mathbb{Z}_q^n = \mathbb{Z}_q \times \cdots \times\mathbb{Z}_q$ as a module over $\mathbb{Z}_q\equiv\mathbb{Z}/q\mathbb{Z}$, for general $q$.
I am interested in the following questions:

How many submodules of size $q^k$, $k\leq n$, does it have? How many of them are free? Can something be said about the ratio of these two numbers when $n\to\infty$ and $k=\lambda n$, $\lambda\in(0,1)$?

Can someone give me a reference where such or similar problems have been studied? Or else provide pointers how to tackle them?