If we're effectively just counting the cells with values in them in columns E:IV, then put this formula in A5 and copy down:

=COUNTA(E5:IV5)