Is there a way to produce the following statistics for a code basis:
# level 3
23 DeprecatedMethod
20 DeprecatedProperty
10 DeprecatedClass
...
# level 9
...
20 UndefinedDocblockClass
10 ParadoxicalCondition
5 InvalidThrow
This would be a great way to get an overview over which issues (with few occurrences) can be easily fixed and set to "error" afterwards.
There's (undocumented) output format called json-summary that produces something similar:

Ideally Psalm would do this for you – running --init would pick the best level for your project
Psalm now does this for you magically
Most helpful comment
There's (undocumented) output format called

json-summarythat produces something similar: