How many days should a child remain out of preschool with a diagnosis of pneumonia?

It depends. It depends on how your child feels. If he has had no fever for 24 hr, isn't coughing much, and has a normal activity level, he can return. If it is bacterial pneumonia, i like patients to have at least 24 hours of antibiotics before exposing others.
While symptomatic. The issue for attending school when sick is how long other children can get sick from the child. To go back to school or be around others, the child should no longer have any fever, and should be improving in cough, sneezing and nasal congestion. For a typical cold, this is usually 3-4 days, but can be longer for pneumonia. Talk to your doctor or nurse and the staff at preschool.