public static <T> int count(Node<T> first){
if(first == null) return 0;
return 1 + count(first.getNext());
}
public static <T> int count(TreeNode<T> root){
if(root == null) return 0;
int childrenNodeCount = 1;
for(TreeNode<T> child: root.getChildren()){
childrenNodeCount += count(child);
}
return childrenNodeCount;
}