Beyond stacking: a maximum-likelihood method to constrain radio source counts below the detection threshold