To determine if circulating CD4+ lymphocyte counts are predictive of specific infectious or neoplastic processes causing pulmonary dysfunction.Retrospective, consecutive sample study.Referral-based clinic and wards.We studied 100 patients infected with human immunodeficiency virus (HIV) who had had 119 episodes of pulmonary dysfunction within 60 days after CD4 lymphocyte determinations.Circulating CD4 counts were less than 0.200 X 10(9) cells/L (200 cells/mm3) before 46 of 49 episodes of pneumocystis pneumonia, 8 of 8 episodes of cytomegalovirus pneumonia, and 7 of 7 episodes and 19 of 21 episodes of infection with Cryptococcus neoformans and Mycobacterium avium-intracellulare, respectively. In contrast, circulating CD4 counts before episodes of nonspecific interstitial pneumonia were quite variable: Of 41 episodes, 11 occurred when CD4 counts were greater than 0.200 X 10(9) cells/L. The percent of circulating lymphocytes that were CD4+ had a predictive value equal to that of CD4 counts. Serum p24 antigen levels had no predictive value.Pneumocystis pneumonia, cytomegalovirus pneumonia, and pulmonary infection caused by C. neoformans or M. avium-intracellulare are unlikely to occur in HIV-infected patients who have had a CD4 count above 0.200 to 0.250 X 10(9) cells/L (200 to 250 cells/mm3) or a CD4 percent above 20% to 25% in the 60 days before pulmonary evaluation. Patients infected with HIV who have a CD4 count below 0.200 X 10(9) cells/L (or less than 20% CD4 cells) are especially likely to benefit from antipneumocystis prophylaxis.