Counting the number of centralizers of 2-element subsets in a finite group