Count max values compared with previous array

I try to count the number of values in a row that are equal are greater to MAX() value of a (part) of the column above.

For example: compared to the 3 cells above itself. In E comes the ‘count’. i marked the cells it should count with *.

enter image description here

My final array is about 200×5000… I already tried (cell E4 in example) stuff like: {=SUM(IF(A4:D4>=MAX(OFFSET(A1,ROW($ 1:$ 4)-1,0,3,1)),1,0))} {=COUNTIF(A4:D4,”>=”&MAX(OFFSET(A1,0,ROW($ 1:$ 4)-1,3,1)))}

Hoping that the ROW() & OFFSET function would split the MAX function over the columns… But none give a decent result. I can of course split the MAX() over 200 different columns on a different sheet. But I’m getting nightmare because i can’t get it done in a single array formula.