fix: #3307744 Prevent TypeError in count()

Closes #3307744

Merge request reports

Loading