Statistics of roots of congruences