Support for sets

support for sets - count the number of unique values seen since the last flush