public static int getMatchCount(TreeNode root, TreeNode p, TreeNode q){
        if(root == null) return 0;
        int count = (root == p || root == q) ? 1 : 0;
        return count + getMatchCount(root.left, p, q) + getMatchCount(root.right, p, q);
    }