in reply to Counting elements in array and outputing the count and item
Are you sure that you can't do it with the same database query?
What is the query you do?
Careful with that hash Eugene.