It's difficult to give you an exact formula without seeing how your data is laid out, but if you list all your product IDs in a separate table then you will be able to use a SUMIF formula to get totals for each, and then you could use RANK to get the most popular.

Hope this helps.

Pete