Solve Exercise 2-9: bitcount()