Statistics of Number Fields and Function Fields