In fact, the dynamic part of the label is not that flexible.
Group:Switch:OR(ON,OFF) group_house_switch_light "Number of Lights on [%d]"
would suffice to get the correct answer, but the total number of members can’t be displayed this way.
You could build a rule like this:
rule "count members"
Member of gGroup changed
var Integer ctOff = gGroup.members.filter[m|m.state == OFF].size
var Integer ctOn = gGroup.members.filter[m|m.state == ON].size // maybe var Int instead of var Integer?
var Integer ctSum = gGroup.members.size
var lOn = ctOn.toString + " out of " + ctSum.toString + " are switched ON"
var lOff = ctOff.toString + " out of " + ctSum.toString + " are switched OFF"
Afaik there are commands to change the label through a rule, but I never used them, so I don’t know if this will work as ecpected. Of course you could use a String Item to store the label and to display it.