matrix = [[ 1, 2, 3, 4, 0],
[ 5, 6, 100, 8, 2],
[-9, -4, -3, 2, 71],
[ 1, 7, 100, 9, 6],
[ 9, 10, 11, 12, 13]]
rows = len(matrix)
cols = len(matrix[0])
count = 0
for i in range(0, rows):
if (sorted(matrix[i]) == matrix[i]):
count += 1
print("Total sorted rows: " + str(count));
'''
run:
Total sorted rows: 2
'''