これが
SELECT PM.*,
(
PM.SongCount + PM.LessonCount +
PM.SongCommCount + PM.LessonCommCount
) AS TotalCount
FROM (
SELECT P.poster_id,
(
SELECT COUNT(poster_id)
FROM song S
WHERE P.poster_id = S.poster_id
) AS SongCount,
(
SELECT COUNT(poster_id)
FROM lesson L
WHERE P.poster_id = L.poster_id
) AS LessonCount,
(
SELECT COUNT(poster_id)
FROM SongComment SC
WHERE P.poster_id = SC.poster_id
) AS SongCommCount,
(
SELECT COUNT(poster_id)
FROM LessonComment LC
WHERE P.poster_id = LC.poster_id
) AS LessonCommCount
FROM poster AS P
LIMIT 0, 50
) AS PM
ORDER BY
(
PM.SongCount + PM.LessonCount +
PM.SongCommCount + PM.LessonCommCount
) DESC