Add distinct versions for diff and count