BSTでk番目に小さいものを見つけようとしています。
public void findKthSmallest(BSTNode<T> node, int k) {
    if(node == null) 
        return;
    findKthSmallest(node.left, k);
    count++;
    if (k == count) {
        System.out.println("Kth smallest: " + node.data);
        return;
    }
    findKthSmallest(node.right, k);
}
ここで count はインスタンス変数です。関数が戻るとリセットされるため、関数のパラメーター (ローカル変数) として count を使用して実装する方法を理解できません。
何か案が??