Suppose I have this binary tree in level order:

I want to return a pointer to the 5th node. I am having trouble constructing a function to do so.
Here's what I have so far:
Node* GetNodeAtCount(Node *r, int x) { if(r != NULL) { if(r->count == x) {return r;} else { GetNodeAtCount(r->left, x); // my problem is here GetNodeAtCount(r->right, x); } } } My function only correctly returns the right side of the tree. I cannot figure out a way to call the recursive function separately, since I cannot filter by having a "greater than" or "less than" comparison, i.e. to go to the right subtree, left subtree, etc.