given an array a of n non-negative integers, count the number of unordered pairs
By Laurence Durgan at Dec 15 2020