Counting reference comparisons and equality checks separately.