Mass formulas for mod p Galois representations 1