Sort logics by associated ontologies count on #index.