Statistics of class groups and number fields