my_array
dt = np.dtype((np.void, my_array.dtype.itemsize * my_array.shape[1]))
b = np.ascontiguousarray(my_array).view(dt)
unq, cnt = np.unique(b, return_counts=True)
unq = unq.view(my_array.dtype).reshape(-1, my_array.shape[1])
unq
cnt
Count how many times each row is present in numpy.array