I am using this query to return return a list of songs stored in $sTable along with a COUNT of their total projects which are stored in $sTable2.
/* * SQL
SELECT blahblahblah, IFNULL(bb.projects_count, 0) FROM $sTable b etc...