Counting children of tree nodes.