Function to find the count of submatrix whose sum is X
function countSubsquare ( arr , n , X ) { var dp = Array ( n + 1 ) ; for ( var i = 0 ; i < n + 1 ; i ++ ) dp [ i ] = Array ( m + 1 ) . fill ( 0 ) ;