I'm looking for a way to query all categories that have at least one relation. I'm not looking for the relatedTo() parameter, which would give me categories related to something specific.
Basically, if we talk in Wordpress terms, I'm looking for hideEmpty = true.
Is there anything like that in Craft?
Something like: craft.categories.group('products').hasRelated()