Add a method `count_leaves` that recursively counts the number of leaf nodes in the given KNaryTree. 