Write a function that takes an unsigned integer and returns the number of '1' bits it has (also known as the Hamming weight).
Explanation: The binary representation of 11 is 1011 (3 set bits).