Updated to compute number of children for each type of node so that things like "find" work reliably