First, your function can't be void. It has to return the number of ints that were typed, so it has to return int or int*.
Secondly, is the tree a binary tree that has all the ints that were typed? If so, any tree traversal algorithm will do. You just need a variable that you will increment when you find a new node (assuming they all store an int).
int preorder(tnode * t){
if (t == NULL) return 0;
else{
return 1 + preorder(t->left) + preorder(t->right);
}
}
If t isn't null, then it has 1 int stored in it. Then you just have to check the node's children.