Exercise 2-9. faster version of bitcount