count_matrix1(Size, PtrX, PtrY) ->