In the dock, some apps show a number in the top right corner of their icons, like this:
The AppCenter does this to show how many updates you currently have, and others (like Mailspring pictured here) use this to show how many items there are of interest (unread emails).
How can I hide these? Ideally, I'd like to hide them for certain apps (Mailspring), but keep them for others (AppCenter).
In System Settings, there are various settings for notifications, and various settings for the dock, but not for these badges specifically.
This question asks a similar thing, but it's specifically about AppCenter, so its question and answers aren't helpful in answering this question.