Support for sets

support for sets - count the number of unique values seen since the last flush
num is guaranteed to be `len(sets)`, right?

could set this here, drop the `num++`