Given a finite abelian group G, a finite set D, and a mapping f : D → G, we find the number of r-subsets S ⊆ D where for b ∈ G,We obtain simple exact expressions when f is an abelian group homomorphism. When G = F q , we extend known results when D ∈ {F q , F * q } and f (x) = x N , which include quadratic and semiprimitive cases. We count degree n monic polynomials over F q with r distinct roots in a set D ⊆ F q when the leading terms of degree at least n − are fixed.We obtain new formulas for = 1 when D is a multiplicative subgroup of F * q , and for = 2 when D is an arbitrary subfield of F q with q odd.