結果 : count number of pairs in array python