'Count distinct items during a time range.'

def get_distinct_counts_totals(self, model, keys, start, end=None, rollup=None):

    (rollup, series) = self.get_optimal_rollup_series(start, end, rollup)
    responses = {}
    with self.cluster.fanout() as client:
        for key in keys:
            ks = []
            for timestamp in series:
                ks.append(self.make_key(model, rollup, timestamp, key))
            responses[key] = client.target_key(key).execute_command('PFCOUNT', *ks)
    return {key: value.value for (key, value) in six.iteritems(responses)}
