Count bits in a bit set