adding leaf count

counting the number of leafs are iterated using this selection scheme