How To Count Pairs In A List Python