Some predefined widgets offer the option to use a `select` element (dropdown) and/or a counter after each entry. How can I add the CSS classes `widget-with-dropdown` or `widget-with-counters` to these widgets?

There are already solutions for [custom widgets](https://wordpress.stackexchange.com/questions/18942/add-class-to-before-widget-from-within-a-custom-widget/18945#18945), [known sidebar ids](https://wordpress.stackexchange.com/questions/15024/widget-area-modify-paramxy-from-widget-n) or [positions](https://wordpress.stackexchange.com/questions/535/how-do-i-add-custom-css-to-only-certain-widgets), but I have to inspect the parameters for the current instance, and I want to catch all possible positions or widgets (if they follow the WordPress naming scheme).