moved general-to-specific ordering stuff to the module where it belongs (relationship counting)