adding noChildren function
adding recursive solution countLeaves2, no count var