Warning: count(): Parameter must be an array or an object that implements Countable
It sounds like you're running PHP 7.2 or greater with a version of CiviCRM that doesn't support PHP 7.2+.  If you edit your question to include your CiviCRM version, that could help folks troubleshoot.  However, it sounds like you may need to upgrade your CiviCRM to a version that supports 7.2.