Photon statistics in the extended Jaynes-Cummings model