Squeezed states with thermal noise. I. Photon-number statistics.