<t>Count all the DISTINCT program names by program type and push number<br/>
<br/>
SELECT program_type AS [Type],<br/>
Count(DISTINCT program_name) AS [Count],<br/>
FROM cm_production<br/>
WHERE push_number = @push_number<br/>
GROUP BY program_type <br/>
<br/>
```<br/>
<br/>
`DISTINCT COUNT(*)` will return a row for each unique count. What you want is [`COUNT(DISTINCT )`](http://msdn.microsoft.com/en-us/library/ms175997.aspx): evaluates expression for each row in a group and returns the number of unique, non-null values.</t>