SELECT COUNT(*) AS count, id
FROM tablename
GROUP BY id
And if you wanted the total number of feedbacks without using mysql_num_rows you could add a "WITH ROLLUP" which will give you the sum of all the count(s) (or how many feedbacks are in the table 🙂 )
SELECT COUNT(*) AS count, id
FROM table
GROUP BY id
WITH ROLLUP
EDIT: Woops... forgot the id field in the SELECT clause 🙂
EDIT 2: To output to the user, you'd do something like:
$query = "SELECT COUNT(*) AS `count`, `id`
FROM `tablename`
GROUP BY `id`";
$result = mysql_query($query) or die('MySQL Error (#' . mysql_errno() . '): ' . mysql_error());
while($row = mysql_fetch_assoc($result))
{
echo 'Item #' . $row['id'] . ' has received ' . $row['count'] . ' feedbacks.<br />';
}
EDIT 3: Forgot to alias the COUNT() function so we could refer to it by name.... it's too early for thinking 🙂