How to count the number of set bits in a 32-bit integer? How to count the number of set bits in a 32-bit integer?