I thought I was getting pretty good with Excel sumifs/maxifs/minifs/countifs but I am stuck on this one. I am trying to count the number of grouped elements in a list, using a concise formula in a single column (manually copied down the array range) preferably using one of my favorites mentioned above and without using Excel's annoying array function where you have to press Ctrl/Shift/Enter, and without using VBA. I illustrate and explain the desired outputs of block group counts below in yellow. Any ideas for a formula that does this?
The << Formula columns are only illustrating countifs() using a single condition and multiple conditions, respectively.

