Reorganize count on relations