prova così

SELECT COUNT(DISTINCT data,nome) FROM tabella where etc etc