DAPI can stain dead cells, in fact it prefers to stain dead cells. This has to do with the membrane permeability of dead cells. It cannot stain live cells with intact membranes, unless used at high concentrations. Even then, the fluorescence under a microscope would be weak compared to if DAPI is used to stain dead cells.