I try to COUNTIF(B2:Q2;\">5\") for each row and return the result for each row in column A but I clearly fail on using ARRAYFORMULA
COUNTIF(B2:Q2;\">5\")
A
ARRAYFORMULA
In addition to Max's solution, I believe it should be possible to use COUNTIF(). See if this works
=ARRAYFORMULA(COUNTIF(IF(B2:Q>5,ROW(B2:B)), ROW(B2:B)))