Probabilmente ti basta modificare un po' la prima query:
return Post::selectRaw('Count(likes.id) + Count(comments.id) as total_count') ->withCount(['likes', 'comments']) ->groupBy('posts.id') ->orderByRaw('(Count(likes.id) + Count(comments.id)) desc') ->paginate();