#HyperLogLog is super clever.
It can count any number of unique values in constant space (i.e. without storing the values) within a specified margin of error.
And HLLs can be merged to count unique number of values in both sets! So you can quickly count something like "unique number of requests per day", and combine these into "per month", and "per year", without storing a year worth of history.