Count Nice Pairs in an Array