Currently there is no option to issue badges by number of courses or by number of badges, what exists is the criterion to define specific sets of courses and badges.
It is common to issue badges based on the amount of experience that the user has inside the platform, how much it has already achieved in general.
Beginner - got 5 badges or completed 5 courses;
Adventurer - obtained 10 badges or completed 10 courses;
Explorer - obtained 25 badges or completed 25 courses
Veteran - Got 50 badges or completed 50 strokes.
Other criteria similar to "Completing Profile" would also be interesting, for example:
Join the forum;
Communicate via Chat or Message;
Create an event in the calendar;
Get maximum grade in a certain number of courses.
Another suggestion would be to split the Course Badges section into two:
Badges Linked to the Course - When the course is part of the "courses set" to obtain the badge.
Course Badge - When the achievement of the badge depends exclusively on the completion of that course. Site badges that only have one course as a criterion could also appear as a badge of the course, although the criterion is "Courses Set" it is perfectly possible to add a single course as a condition.