Count the number of trees in the forest stored using binary trees
Because each tree has the right node of the previous tree, to the right dfs, each time a counter is found +1
int num=0;
void count(tree *p)
{
if(p==NULL)return;
num++;
count(p->r );
}