1. Bloggers
blogger_id
1
2
3
2. Posts
post_from_blogger_id
1
1
1
2
2
3
As
SELECT bloggers.*, COUNT(post_id) AS post_count
FROM bloggers LEFT JOIN blogger_posts
ON bloggers.blogger_id = blogger_posts.blogger_id
GROUP BY bloggers.blogger_id
ORDER BY post_count
(Note: MySQL has special syntax that lets you GROUP BY without aggregating all values, it's intended for exactly this situation).