int CountNum(Tree * T, int key) // precondition: returns the number of nodes in Tree T // with the value key. Returns 0 if no // nodes contain key or if the tree is empty { int count = 0; if (T != NULL) { if (T->info == key) { count++; } count += CountNum(T->left,key) + CountNum(T->right,key); } return count; }