AMI interview question

Count set bits in an integer.