lol I just did out of curiosity.
I was a bit surprised the badge query uses the posts table instead of the badge_posts view.
Anyway, try this
(you’ll need to know your id number)
-- [params]
-- int :the_user_id = 2
SELECT COUNT(posts.like_count) AS liked_posts
FROM posts
WHERE posts.user_id = :the_user_id
AND posts.like_count > 0