I believe it was first proved by Kleiman (you only need to assume fixed dimension and degree, no need to assume a subvariety of some fixed $\mathbb P^n$), see Corollary 6.11
S. Kleiman, Exp XIII in A. Grothendieck et al., Theorie des Intersections et Theoreme de Riemann-Roch (SGA 6), Lecture Notes in Math No. 225, Springer-Verlag, Heidelberg (1971).