If you see an "Exception - count(): Argument #1 ($value) must be of type Countable|array, stdClass given" error when accessing your profile or badges page on Moodle, then its possible that one of the badges in your backpack is causing this error.
To resolve this error:
Log in to your backpack account.
Remove all the badges from the public collection that is connected to your Moodle profile.
Log in to Moodle and visit your profile or badges page.
Confirm that you do not see any errors now.
Then in your backpack account, add one badge to your public collection that is connected to your Moodle profile.
Check your Moodle profile to see the badge displays without any errors.
Repeat steps 5 and 6 for each badge.
If a badge causes an error, remove it from the public collection.