updated demo to count a million distinct items