s = Stats().push('a').push('a').push('b') s["a"] # 2 s["b"] # 1 a = ["x", "y", "y"] s = Stats(a) s["x"] # 1 s["y"] # 2