Approximate photocount statistics for coherent and chaotic radiation of arbitrary spectral shape