Pergunta de entrevista da empresa Garmin

Given an integer, write a function that returns the count of bits in an integer.