  We count the number of polynomials over finite fields with prescribed leading
coefficients and a given number of linear factors. This is equivalent to
counting codewords in Reed-Solomon codes which are at a certain distance from a
received word. We first apply the generating function approach, which is
recently developed by the author and collaborators, to derive expressions for
the number of monic polynomials with prescribed leading coefficients and linear
factors. We then apply Li and Wan's sieve formula to simplify the expressions
in some special cases. Our results extend and improve some recent results by Li
and Wan, and Zhou, Wang and Wang.
