TO_DATE
is not a JPQL function, try it with parameters
String query = "SELECT COUNT(data.amount) FROM FinanceTransactionData data "
+ "WHERE data.cusId = :cusId AND data.dateOfIssue "
+ "BETWEEN :fromDate AND :toDate";
If you set the parameters, be sure to set the right TemporalType.
BTW: Do not use StringBuilder to concatenate String literals, see when to use StringBuilder in java