Amazon Interview Question

Write a program to count the bits in an int.