Abstract
Let n be a positive integer and p a prime number. The number of finite abelian groups of order pn is given by the partition function p(n). The number of subgroups of a fixed order in a finite abelian group of given rank is given by sums of Hall polynomials. Here, we use recurrence relations to derive explicit formulas for counting the number of subgroups of given order (or index) in rank 3 finite abelian p-groups and use these to derive similar formulas in few cases for rank 4. As a consequence, we answer some questions by M. Tärnäuceanu and L. Tóth. We also use other methods such as the method of fundamental group lattices introduced by Tärnäuceanu to derive a similar counting function in a special case of arbitrary rank finite abelian p-groups.