Predicting surface free energies with interatomic potentials and electron counting