Pregunta de entrevista de Rockwell Automation

Count how many bits are turned on in an integer.