Performance boost for N-M relations and counts.