Added bitcount function.

Exercise 2-9.