datastructure: tree: code changes to count nodes and determine height