Counting Hilbert polynomials of projective varieties EDIT. Fix $n,d,k\in\mathbb{N}$.  Let us consider the set $\mathcal{P}_{n,d,k}$ of polynomials $P$ in one variable for which there exits a closed irreducible subvariety $X_P\subset \mathbb{C}\mathbb{P}^n$ 
(which may be assumed to be smooth if necessary)  of dimension $k$ and degree $d$ whose Hilbert polynomial is equal to $P$.
Question. Is it true that the set $\mathcal{P}_{n,d,k}$ is finite?
 A: Edit. I edited the answer below so that it also applies to geometrically reduced schemes of degree $d$ and pure dimension $k$.  Also, the argument shows that there is a single finite set $\mathcal{P}_{n,d,k}$ for all fields simultaneously, i.e., $\mathcal{P}_{n,d,k}$ is independent of the characteristic.  I also edited the proof to make it simpler (in particular, there is no direct reference to existence of flattening stratifications). 
Thank you for editing the question.  That question is quite different from my first interpretation.  
For geometrically reduced varieties of pure dimension $k$ and degree $d$, the set $\mathcal{P}_{n,d,k}$ is finite.  In some sense, I believe this is already in Grothendieck's Bourbaki seminars constructing the Hilbert schemes.  Bogomolov reminded me of the following argument a few years ago, together with an associated degree bound on the singular locus. I have seen a version of this also in an article by Mumford.
MR0282975 (44 #209) Reviewed 
Mumford, David 
Varieties defined by quadratic equations. 1970 
Questions on Algebraic Varieties (C.I.M.E., III Ciclo, Varenna, 1969) pp. 29–100 
Edizioni Cremonese, Rome 
14.01 
For every field $\kappa$, for every closed subscheme $X\subset \mathbb{P}^n_\kappa$, denote by $\mathcal{I}_X$ the ideal sheaf of $X.$  For every integer $d$, denote by $I_{X,d}\subset H^0(\mathbb{P}^n_\kappa,\mathcal{O}(d))$ the $\kappa$-subspace $H^0(\mathbb{P}^n_\kappa,\mathcal{I}_X(d)).$  There is a natural map of coherent sheaves $I_{X,d}\otimes_\kappa \mathcal{O}(-d) \to \mathcal{O}_{\mathbb{P}^n_\kappa}$.  Denote by $\mathcal{I}_{X,d}$ the image of this map.  By construction $\mathcal{I}_{X,d}$ is an ideal sheaf that is contained in $\mathcal{I}_X$.  Denote by $X_d$ the zero scheme of $\mathcal{I}_{X,d}$; this contains $X$ as a closed subscheme.
Proposition. Over every algebraically closed field $\kappa$, for every geometrically reduced, closed subscheme $X\subset \mathbb{P}^n_\kappa$ of dimension $k$ and degree $d$, the zero scheme $X_d$ equals $X$ set-theoretically.  Moreover, on the smooth locus $X^o$ of $X$, $X_d$ equals $X$. 
Proof. If $k$ equals $n-1$, then we are done: every reduced, degree $d$ subscheme of $\mathbb{P}^{k+1}_{\mathbb{C}}$ of pure dimension $k$ is a degree $d$ hypersurface, so $\mathcal{I}_{X,d}$ equals $\mathcal{I}_X$.
Since $X$ is geometrically reduced, the smooth locus $X^o\subset X$ is a dense open subscheme. For every $x\in X^o$, the union over all $y\in X\setminus{x}$ of the secant line $\text{span}(x,y)$ is a constructible subset of dimension $k+1$.  Similarly, the "projective tangent space" to $X$ at $x$ is a linear subvariety of $\mathbb{P}^n_{\mathbb{C}}$ of dimension $k$.  Finally, for a fixed closed point $z\in \mathbb{P}^n_{\mathbb{C}}\setminus X$, the union over all $y\in X$ of $\text{span}(z,y)$ is a closed subset of dimension $k+1$.  There exists a linear subvariety $\Lambda\subset \mathbb{P}^n_{\mathbb{C}}$ of dimension $n-k-2$ that is disjoint from all of these constructible subsets of dimension $\leq k+1$. Thus, the $n-k-1$-plane $\text{span}(\Lambda,x)$, intersects $X$ at only $x$, and the intersection is (tangentially) transverse at this point.  Moreover, for every $y\in X$, $\text{span}(\Lambda,y)$ does not contain $z$, or else $\Lambda$ would contain $\text{span}(z,y)$.
Thus, the linear projection "away" from $\Lambda$, $$\pi:\mathbb{P}^n_{\mathbb{C}}\setminus \Lambda \to \mathbb{P}^{k+1}_{\mathbb{C}},$$ restricts on $X$ to a morphism that is injective and unramified on $\pi^{-1}(U)$ for $U$ some Zariski open neighborhood of $\pi(x)$.  The image $\pi(X)$ is a degree $d$ hypersurface, $\text{Zero}(G_{\Lambda,x})$ for some degree $d$ polynomial $G_{\Lambda,x}$ (even without these transversality hypotheses, there is a degree $d$ polynomial naturally associated to the image using "det", "Div" and "Chow" as in Knudsen-Mumford and Fogarty).  Consider $F_{\Lambda,x}$, the pullback by $\pi$ of $G_{\Lambda,x}$ as a degree $d$ polynomial on $\mathbb{P}^n_{\mathbb{C}}.$  The zero scheme of $F_{\Lambda,x}$ contains $X$, but it does not contain $z$.
Varying $\Lambda$, the common zero locus of these polynomials is a closed subscheme that set-theoretically equals $X$ (since for every $z$, there is a $F_{\Lambda,x}$ that does not vanish at $z$), and that scheme contains a Zariski open subset that equals a Zariski open neighborhood of $x$ in $X$.  Thus, up to varying both $\Lambda$ and $x$, the common closed subscheme set-theoretically equals $X$, and the scheme contains $X^o$ as a dense open subscheme (with its correct reduced scheme structure).   This closed subscheme contains $X_d$, so the same is true for $X_d$. QED
Denote by $P_n(t)\in \mathbb{Q}[t]$ the numerical polynomial such that for every integer $r\geq -n$, $P_n(r)$ equals $\binom{n+r}{n}$.  The dimension $m$ of $I_{X,d}$ is $\leq P_n(d)$.
Proposition. For every integer $m$ with $n-k\leq m \leq P_n(d)$, there is a finite set $\mathcal{P}_{n,d,k,m}$ of Hilbert polynomials such that for every algebraically closed field $\kappa$ and for every reduced closed subscheme $X\subset \mathbb{P}^n_\kappa$ of degree $d$, of pure dimension $k$, and with $\text{dim}_\kappa I_{X,d} = m$, the Hilbert polynomial of $X$ is in $\mathcal{P}_{n,d,k,m}$.
Proof.  Denote by $G_m$ the Grassmannian over $\text{Spec}(\mathbb{Z})$ parameterizing rank $m$, locally free quotients of the free $\mathbb{Z}$-module $H^0(\mathbb{P}^n_{\mathbb{Z}},\mathcal{O}(d))^\vee.$  Denote by $\mathcal{Y} \subset G_m\times_{\text{Spec}(\mathbb{Z})} \mathbb{P}^n_{\mathbb{Z}}$ the closed subscheme cut out by the universal family of $m$-dimensional linear systems of degree $d$ polynomials.  A locally closed subscheme $S$ of $G_m$ is transversal if (i) the restriction $\mathcal{Y}_S=S\times_{G_m} \mathcal{Y}$ is surjective and $S$-flat of pure relative dimension $k$, (ii) the smooth locus $\mathcal{Y}^o_S$ of $\rho_S:\mathcal{Y}_S\to S$ is set-theoretically dense in $\mathcal{Y}_S$, (iii) for the closure $\overline{\mathcal{Y}}^o_S \subset \mathcal{Y}_S$, $\overline{\mathcal{Y}}^o_S$ is $S$-flat, and (iv) for every geometric point of $S$, the fiber of $\mathcal{Y}^o_S$ over that point is schematically dense in the fiber over that point of $\overline{\mathcal{Y}}^o_S$.  A locally closed subscheme $S$ of $G_m$ is irrelevant if either (a) $\mathcal{Y}_S$ is empty, (b) $\rho_S:\mathcal{Y}_S\to S$ is surjective and flat, but every geometric fiber has an irreducible component of dimension $<k$, or (c) $\rho_S:\mathcal{Y}_S\to S$ is surjective and flat of relative dimension $\geq k$ everywhere, but the open subset $\mathcal{Y}^o_S$ where $\rho_S$ is smooth of relative dimension $k$ is dense in no geometric fiber of $\rho_S$.  The claim, to be proved by Noetherian induction, is that for every closed subscheme $T\subset G_m$, there exists a finite collection of disjoint locally closed subschemes $S\subset T$ each of which is either transversal or irrelevant and whose union equals $T$, as a set.  By Noetherian induction, it suffices to prove that for every integral closed subscheme $T\subset G_m$, there exists a nonempty (hence dense) open subscheme $S\subset T$ that is either transversal or irrelevant.     
The image of the proper morphism $\rho:\mathcal{Y} \to G_m$ is a closed subset $C$ compatible with arbitrary base change.  If $T$ is not contained in $C$, define $S$ to be the relative complement $T\setminus T\cap C$.  Then $S$ is a dense open subscheme of $T$, and $\mathcal{Y}_S$ is empty.  Thus $S$ is irrelevant by (a).  Thus, without loss of generality, assume that $T$ is contained in $C$.  
Restricting $\mathcal{Y}$ over $C$, by upper semicontinuity of fiber dimension, there is an open subscheme $\mathcal{Y}_{<k}$ of $\mathcal{Y}$ on which the fiber dimension is $<k$.  The image of that open subset in $C$ a constructible subset.  If the intersection of $T$ with this constructible subset contains an open subset of $T$, then there exists a dense open subset $S$ of this open set (endowed with its induced reduced scheme structure) such that $\rho_S$ is flat over $S$, but every geometric fiber has an irreducible component of dimension $< k$.  Thus $S$ is a dense open subset of $T$ that is irrelevant by (b).  Thus, without loss of generality, assume that the intersection of $T$ with this constructible subset is nowhere dense.  By generic flatness, there is a dense open subscheme $T^o\subset T$ over which $\rho_T$ is flat.  Up to shrinking $T^o$, we may assume every irreducible component of every fiber over every geometric point of $T^o$ has dimension $\geq k$. 
The sheaf of relative differentials $\Omega_\rho$ everywhere has rank $\geq k$ on $\mathcal{Y}^{T^o}$.  The locus where $\Omega_\rho$ has rank $\geq k+1$ is the zero scheme of a Fitting ideal.  Denote by $\mathcal{Y}^o_T$ the open complement of this zero scheme in $\mathcal{Y}_{T^o}$.  This is the maximal open on which $\rho_T$ is smooth of relative dimension $k$.  Denote by $Z$ the closed complement of $\mathcal{Y}^o_T$ in $\mathcal{Y}_{T^o}$.  By upper semicontinuity of fiber dimension, there is a closed subset $W$ of $Z$ that is the union of all irreducible components of fibers of $\rho_T|_Z:Z\to T^o$ that have dimension $\geq k$.  If $W$ surjects to $T^o$, then $T^o$ is irrelevant by (c).  Thus, without loss of generality, assume that the closed image of $W$ is a proper closed subset of $T^o$.  Up to replacing $T^o$ by the dense open compoment of the image of $W$ in $T^o$, assume that $W$ is empty.  Since every irreducible component of every fiber of $\rho_{T^o}$ has dimension $\geq k$, and since every irreducible component of dimension $\geq k$ is not contained in the complementary subset $W$ (which is empty), $\rho_{T^o}$ is flat and $\mathcal{Y}^o_T$ is dense in every fiber of $\rho_{T^o}$ for some dense open subscheme $T^o$ of $T$.
Consider the closure $\overline{\mathcal{Y}}^o_T \subset \mathcal{Y}_{T^o}$ of $\mathcal{Y}^o_T$.  By generical flatness, after replacing $T^o$ by a dense open subset, assume that this closure is flat over $T^o$.  By definition, the fiber of $\overline{\mathcal{Y}}^o_T$ over the generic point of $T^o$ is reduced.  Since this fiber is smooth on a dense open subscheme, it is even geometrically reduced, cf. Corollaire 4.6.3, p. 69 of EGA $IV_2$ (I could not find the proof of this in the Stacks Project). By http://stacks.math.columbia.edu/tag/0578 there exists a dense open subscheme $S$ of $T^o$ such that every fiber of $\overline{\mathcal{Y}}^o_S$ over a geometric point of $S$ is reduced.  Since $\mathcal{Y}^o_S$ is set-theoretically dense in this reduced fiber, it is scheme-theoretically dense.  Thus, the dense open subset $S$ of $T$ is transversal.  Therefore the claim is proved by Noetherian induction.
In particular, applying the claim to $T=G_m$, there exists a finite partition of $G_m$ into locally closed subsets, each of which is either irrelevant or transversal.  Each transversal stratum is a Noetherian topological space, and thus has only finitely many connected components.  Up to replacing the finitely many transversal strata by their finitely many connected components, assume that each transversal stratum is connected.  For each connected transversal stratum  $S$, $\overline{\mathcal{Y}}^o_S\to S$ is projective and flat.  Thus, there exists a single Hilbert polynomial such that every fiber of $\overline{\mathcal{Y}}^o_S$ over every geometric point of $S$ has that Hilbert polynomial.  Thus the set $\mathcal{P}_{n,d,k,m}$ of Hilbert polynomials arising from transversal strata is a finite set.
Finally, by the previous proposition, for every geometrically reduced closed subscheme $X\subset \mathbb{P}^n_\kappa$ of degree $d$ and pure dimension $k$, the $\kappa$-point of $G_m$ parameterizing $I_{X,d}$ is contained in no irrelevant stratum.  Thus it is contained in a transversal stratum.  So the Hilbert polynomial of $X$ is contained in the finite set $\mathcal{P}_{n,d,k,m}$. QED
Bogomolov's Bound.  For every geometrically reduced, closed subscheme $X\subset \mathbb{P}^n_\kappa$ of degree $d$ and pure dimension $k$, if the singular locus of $X$ has dimension $\ell\geq 0$, then the $\ell$-dimensional part of the singular locus has degree $\leq d(d-1)^{k-\ell}$.
Proof.  This can be proved after base change, so assume that $\kappa$ is algebraically closed.  By Bertini's theorem, there exists a linear space $\Lambda$ of codimension $\ell$ in $\mathbb{P}^n_\kappa$ such that the singular locus of $X\cap \Lambda$ equals the intersection of $\Lambda$ with the singular locus of $X$.  Up to replacing $X$ by $X\cap\Lambda,$ assume that $X$ has isolated singularities.  The singular points must be in the common zero locus of the partial derivatives of $F_{\Lambda,x}$ as we vary over $\Lambda$ and $x$.  By Bertini again, for a general collection of $k-1$ partial derivative polynomials of polynomials $F_{\Lambda,x}$, the common zero locus has degree $d(d-1)^k$ and is a zero-dimensional scheme that contains the singular locus of $X$.  Thus the singular locus of $X$ has degree $\leq d(d-1)^k$. QED 
Second Edit.  I looked, and there are some related MathOverflow questions.  The method above using linear projections was also explained by abx in his answer to the following question: Intersections of hypersurfaces of degree $d$ in $\mathbb CP^n$  In particular, my comment to that answer gives an example -- the union of three concurrent lines that span $\mathbb{P}^3_\kappa$ -- where the subspace of $I_{d,k}$ spanned by polynomials $F_{\Lambda,x}$ is a proper subspace, and the zero scheme of that subspace does not equal $X$.  However, as far as I know, it may be the case that $X_d$ equals $X$ for every reduced closed subscheme of $\mathbb{P}^n_\kappa$ of degree $d$ and pure dimension $k$.
