n = (n & 71777214294589695) + ((n & 18374966859414961920) >> 8)
n = (n & 281470681808895) + ((n & 18446462603027742720) >> 16)
n = (n & 4294967295) + ((n & 18446744069414584320) >> 32)
return n
fast way of counting non-zero bits in python