sufficientStat function

Calculate the sufficient statistic of the Potts model for the given labels.