In cell A2, just put 1
; it's the first value and counting itself will give a circular reference warning.
As from cell A3, put the formula:
=IF(C3="TOTAL","",COUNTIF($A$1:A2,">0")+1)
Basically, this will count all the values above 0 and add 1. Fill this formula down and you should be good :)
Or if you have only TOTAL
and numbers in column C, then you can use the following in cell A2:
=IF(C2="TOTAL","",COUNT($C$1:C2))