updates the terminal count appropriately and prints it after the last node
updatetncount(ptree,p,&s2);