Example: Count the number of non-blank rows from the fourth row of column A to the row before the row where the formula is located:
=COUNTA(A4:INDIRECT(ADDRESS(ROW()-1,COLUMN())))
Example: Count the number of non-blank rows from the fourth row of column A to the row before the row where the formula is located:
=COUNTA(A4:INDIRECT(ADDRESS(ROW()-1,COLUMN())))