I've been getting the same error with PHP 8.1 and my test board. 100 or so apps and plugins installed, haven't tried a fresh install yet.
TypeError
count(): Argument #1 ($value) must be of type Countable|array, bool given
if ( $limit !== -1 )
{
$limit -= \count( $methodIssues );
}
$issues[$appOrPlugin] = $issues[$appOrPlugin] ?? [];
$issues[$appOrPlugin][$classDetails['filepath']] = array_merge( $issues[$appOrPlugin][$classDetails['filepath']] ?? [], $methodIssues );