Relation field count & ordering by relation count

Is there a good solution for this? @KadlinoBIT, I’m just curious what you ended up doing.