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 in [24] and L. Tóth in [25]. We also use other methods such as the method of fundamental group lattices introduced in [24] to derive a similar counting function in a special case of arbitrary rank finite abelian p-groups.