First, COUNTIF() only works on a single range, so you can't try and pass two ranges to it.
Secondly AND() is a logical function which returns either TRUE or FALSE
Thirdly if you look at COUNTIF() you have used it with only one argument, COUNTIF requires a range and a criteria.
I presume that you want to know how many cells in the range X10:X54 are >3 but <=4, i.e. between roughly 3.000000001 and 4.0
The function SUMPRODUCT() will do this. For each part of SUMPRODUCT it returns TRUE or 1 for each cell in the range that meets the criteria. If a cell does not meet one of the criteria it returns FALSE or 0 (zero).
It then multiplies each result for each cell together, so any cell that does not meet any one of the criteria returns zero (any value x zero = zero)
It then adds all the individual cell results together, i.e. in this case it adds a series of 1's and 0's for each cell
This formula would return the sum of the values of the cells that meet the citeria:
=IF(K10="","",SUMPRODUCT((X10:X54>3) *(X10:X54<=4) *(X10:X54)))
as the final step is not a test, it is just the cell value, and for each cell its value is multiplied by the 1 or 0 from the two preceeding steps.