exercise 2.35 count-leaves