Displaying option count in refinementList header template

I need to display the total count of the options in my header template of a refinementList.
Ultimately I want the header to display something like:

My Attribute Label (23 total / 3 selected)

Currently the data passed only provides refinedFacetsCount.
Also, transformData.header doesn’t exist.

What is the best way to go about this?

One step further - I also would like to only show this when the widget is collapsed. I could do this a number of ways but if there was a way to tap into an onCollapse event, that would be great.