count the number of '1' in the integer