Below is a patch to the integrator/cp implementation, adding support for CM_REFCNT. The behaviour is not strictly correct, since the counter should be zeroed upon reset. But it wraps fairly often so this flaw shouldn't really affect anyone.
BTW, is this the correct place to submit patches?