According to line number count function is being used in wp_trim_words function. so that function is being called somewhere in your theme or in any plugin that might pass NULL instead of a string. You’ll have to trace the error in the log file.
it seems that when downgrading from PHP 8 to PHP 7 the issue goes away??
THat means your theme or one of your plugins isn’t compatible with PHP 8. You should locate your PHP error log; it will contain a detailed listing of the error, and that should tell you which theme/plugin is the culprit.
I’ll check it – thank you
is there a way to get more detail in the log file – I’m only getting this:
[09-Jan-2022 00:05:16 UTC] PHP Warning: count(): Parameter must be an array or an object that implements Countable in /Users/Marco/Sites/localhost/sites/mmjaeger.com/wp-includes/formatting.php on line 3903
[09-Jan-2022 00:05:16 UTC] PHP Warning: implode(): Invalid arguments passed in /Users/Marco/Sites/localhost/sites/mmjaeger.com/wp-includes/formatting.php on line 3908
Try the Query monitor plugin it might show more details on errors.