I am using PHP8 and found this error here as well: php - count(): Argument #1 ($value) must be of type Countable|array, null given - Stack Overflow
There the error seems to be related to variable case-sensitivity. In the Analytics app in the settings for the data grabber I also see examples with capitals in the set variables.
So: is this thrown error related to using capitals in the regex for Array and Dimension?