1) http://stackoverflow.com/questions/18715798/count-multiple-columns-sql
This is the final format of the query :
SELECT COUNT(*) FROM mytable GROUP BY id, name, address
2) COUNT() in SQL Server accepts the following syntax :COUNT(*)
COUNT(colName)
COUNT(DISTINCT colName)
Good link to read is below
http://stackoverflow.com/questions/18968963/select-countdistinct-error-on-multiple-columns
3) Count(DISTINCT) in multiple columns in SQL Server 2008
http://stackoverflow.com/questions/11920317/countdistinct-in-multiple-columns-in-sql-server-2008
SELECT COUNT(*) FROM (SELECT DISTINCT Column1, Column2 FROM Table) A
4) Counting over distinct columns
http://stackoverflow.com/questions/1471250/counting-distinct-over-multiple-columns