Count number of ways to split the array at index i such that subarray sums are equal
let number_of_subarray_at_i_split = 0 ; if ( prefix_element_count . has ( difference ) ) number_of_subarray_at_i_split = prefix_element_count . get ( difference ) ; if ( suffix_element_count . has ( - difference ) ) number_of_subarray_at_i_split += suffix_element_count . get ( - difference ) ;