This is what I did:
LEFT OUTER JOIN (SELECT COALESCE(ac.count,0) AS count, tid FROM Actions GROUP BY tid) AS ac
However this part does not make logical sense because ac.count hasn't been created at the point it is referenced in coalesce.
COALESCE(ac.count,0) AS count
I looked up the coalesce function and think I understand its purpose. I tried replacing the above with.
COALESCE(COUNT(tid),0) AS count
However, this does not work either.
The LEFT OUTER JOIN fixed it so that it correctly displays all rows which have a count of 0 actions. However, in this instance when I try to display count nothing is displayed rather than 0. In the above use of COALESCE if the count is null it should display the second value. However, this does not seem to be working.