how many nebula's apparent magnitude is 4.0?
(COUNT (AND astronomy.nebula (JOIN astronomy.celestial_object.magnitude 4.0^^http://www.w3.org/2001/XMLSchema#float)))