Change .elems to .total for Sets/Bags, .elems is now what you expect for a hash