Given a p-group G and a subgroup-closed class X, we associate with each X-subgroup H certain quantities which count X-subgroups containing H subject to further properties. We show in Theorem I that each one of the said quantities is always ≡1(modp) if and only if the same holds for the others. In Theorem II we supplement the above result by focusing on normal X-subgroups and in Theorem III we obtain a sharpened version of a celebrated theorem of Burnside relative to the class of abelian groups of bounded exponent. Various other corollaries are also presented and some open questions are posed.