Photon-number statistics from the phase-averaged quadrature-field distribution: Theory and ultrafast measurement | Synapse