Welcome to the forum.

If column A is available, and row 1 is the header, then in A2 and copy down

=ROWS(A$1:A2)-1