Count triples