Google-sheets – How to count cell with upper leter in array

formulasgoogle sheetsgoogle-calculatorgoogle-sheets-arrayformularegexextract

I need to count the upper letter if exist in a particular cell. So my results should be as on the image below. important is ignore in count empty cell.

enter image description here

I noticed that task is simple if I can use languages like JavaScript, or Java function. There, operation on a string is easy, but if I must use a function in google calc this task for me it becomes difficult.

EDIT

I Found solution but it is ugly, long, not readable, and I can't see on that, but works
(in PL language)

=LICZ.JEŻELI(ARRAYFORMULA(CZY.LICZBA(JEŻELI(CZY.PUSTA(F8:AL8);"";ZNAJDŹ(F8:AL8;"A")))*1) ; 1) + LICZ.JEŻELI(ARRAYFORMULA(CZY.LICZBA(JEŻELI(CZY.PUSTA(F8:AL8);"";ZNAJDŹ(F8:AL8;"B")))*1) ; 1) + LICZ.JEŻELI(ARRAYFORMULA(CZY.LICZBA(JEŻELI(CZY.PUSTA(F8:AL8);"";ZNAJDŹ(F8:AL8;"C")))*1) ; 1)

Best Answer

=ARRAYFORMULA(IF(LEN(A1:A&B1:B&C1:C&D1:D&E1:E), 
 MMULT(IFERROR(LEN(IFERROR(REGEXEXTRACT(A1:E, "[A-Z]+")))/
               LEN(IFERROR(REGEXEXTRACT(A1:E, "[A-Z]+"))), 0), 
 TRANSPOSE(COLUMN(A1:E1)^0)), ))

0