2 TestCases failed help me

import java.util.*;
public class Main {
static int towerOfHanoi(int n, String src, String dest, String helper, int count) {

	if (n == 0) {

		return 0;
	}

	// step : 1
	towerOfHanoi(n - 1, src, helper, dest, count++);

	// step : 2
	System.out.println("Move " + n + "th disc from " + src + " to " + dest);
	count++;

	// step : 3
	towerOfHanoi(n - 1, helper, dest, src, count++);
	return count;
}

public static void main(String[] args) {
	Scanner sc = new Scanner(System.in);
	int n = sc.nextInt();
	int count = 0;
	System.out.println(towerOfHanoi(n, "T1", "T2", "T3", 0));

}

}

Hey @nigamshubham1998
No of count is wrong
try for 3
total no of count is 7
correct code :

import java.util.*;

public class Main {
static int towerOfHanoi(int n, String src, String dest, String helper) {
if (n == 0) {
return 1;
}
int count = 0;
// step : 1
count += towerOfHanoi(n - 1, src, helper, dest);
// step : 2
System.out.println("Move " + n + "th disc from " + src + " to " + dest);

	// step : 3

	count += towerOfHanoi(n - 1, helper, dest, src);
	return count;
}

public static void main(String[] args) {
	Scanner sc = new Scanner(System.in);
	int n = sc.nextInt();
	int count = 0;
	System.out.println(towerOfHanoi(n, "T1", "T2", "T3")-1);
}

}