@ardav
Sorry ^^! I opened the thread and went away.. didn't see you answer.. bye ;D
This should work, but maybe someone else can provide a better solution:
<?php
# database connection ...
$q = mysql_query("select category, count(category) as cat_total from images group by category");
while($row = mysql_fetch_object($q))
{
echo "$row->category $row->cat_total";
}
?>
bye :)