Row reduce A to echelon form and
count the pivots. Work column by column: find a non-zero entry at or below the current row (swapping rows if it sits lower), mark it as a pivot, and clear everything beneath it. A column with no such entry is skipped and contributes nothing. Row operations never change the rank, so the pivot count at the end is rank A. It cannot exceed min(3, 3) = 3.