This is only going to return one row;
SELECT COUNT(*) as Num FROM products WHERE productgroup = 'Some Group'
'Num' = 15 // or whatever
This is going to return 15 rows which you can either iterate through, use count() on or leave them and just query mysql's management system to find out how many rows had been returned. mysql_num_rows()
SELECT id FROM products WHERE productgroup = 'Some Group'
The former method has the RDBMS doing all the work, and will be much faster as long as your db table is correctly indexed ( as is ever the case ).
ps if you had used:
SELECT * FROM products WHERE productgroup = 'Some Group'
Just to find out how many matching rows there were we would have to send people to your house just to come and shout at you.