Count unique Triples