Drosophila larvae defend themselves against parasitoid wasps by completely surrounding the egg with layers of specialized hemocytes called lamellocytes. Similar capsules of lamellocytes, called melanotic capsules, are also formed around "self" tissues in larvae carrying gain-of-function mutations in Toll and hopscotch. Constitutive differentiation of lamellocytes in larvae carrying these mutations is accompanied by high concentrations of plasmatocytes, the major hemocyte class in uninfected control larvae. The relative contributions of hemocyte concentration vs. lamellocyte differentiation to wasp egg encapsulation are not known. To address this question, we used Leptopilina boulardi to infect more than a dozen strains of host larvae harboring a wide range of hemocyte densities. We report a significant correlation between hemocyte concentration and encapsulation capacity among wild-type larvae and larvae heterozygous for mutations in the Hopscotch-Stat92E and Toll-Dorsal pathways. Larvae carrying loss-of-function mutations in Hopscotch, Stat92E, or dorsal group genes exhibit significant reduction in encapsulation capacity. Larvae carrying loss-of-function mutations in dorsal group genes (including Toll and tube) have reduced hemocyte concentrations, whereas larvae deficient in Hopscotch-Stat92E signaling do not. Surprisingly, unlike hopscotch mutants, Toll and tube mutants are not compromised in their ability to generate lamellocytes. Our results suggest that circulating hemocyte concentration and lamellocyte differentiation constitute two distinct physiological requirements of wasp egg encapsulation and Toll and Hopscotch proteins serve distinct roles in this process.