A leaf node is a node with no children.
You are given a tree. When one node is deleted, that node and all of its descendants disappear from the tree. Find the number of leaf nodes remaining after deleting the specified node.
The tree below has 3 leaf nodes. The nodes colored green are leaf nodes.

If node 1 is deleted from this tree, node 1 and its descendants are removed together. The nodes colored black are the deleted nodes.

In this case, the remaining tree has 1 leaf node.