In Moodle 3.6:
Create a gradebook with your activities in a category that uses natural aggregation, give the activities a grade value of 1, and set them up so that students will get that full 1 point for completing (how to do this varies by activity type). In the gradebook, weight the activities to "0" and create a grade item with whatever value you want to give ("x" in your post), below it is "5" in grade item "step 1":
Edit "step 1" calculation:
Give the activities item ids, below they are "AC1" "AC2" etc..., then input those item ids into this calculation =if(sum(AC1,AC2,AC3,AC4,AC5,AC6)>=5,5,0) and save.
That will return the value "0" if the sum of the grade items is lower than 5 and the value "5" if the grade items are greater than or equal to 5.
To award grade "y" in your post, repeat this process, adding another grade item with value "y-x" (where y-x equals 10 in the following calculation) and the calculation =if(sum(AC1,AC2,AC3,AC4,AC5,AC6)>=10,10,0)
In Moodle 3.5 and below
There is no "if" function. I'm working on how to work around that. I'll update later.