@Mishatandon one way that this can be done is to have a separate list for the course to hold the current number of participants. So initially you would create the item in that list (there will only ever be 1 item) and set it to 0. It will increment as each user signs up.

You would hold the details of the participants in your main list:

The flow is as follows. When a new response is submitted, get the response details. Next get the row from the SharePoint Course increment list

Next, add an apply to each and select value (from the Get items). Add a Compose control (which I've named ComposeCurrentNumber) to hold the number from the NumberSignedUp column.
Next, add a condition of if the output of the ComposeCurrentNumber is less than or equal to 9. In other words if the increment list has a NumberSignedUp value to 10 you don't want to sign up any more people.

I recommend you set the concurrency settings in the Apply to Each to On and set it to 1 so that if 2 people respond at the same time the flow will run correctly:

In the green if Yes channel update the SharePoint Course increment list and set the new value of the NumberSignedUp column to the following expression:
add(outputs('ComposeCurrentNumber'),1)
Next, create an item in the main Participants SharePoint list.

The last action in the green If yes channel is to send a "You are registered..." email

In the red If No channel update the increment list and send the "sorry.." email.
The email for the first 10 participants is shown below: 
And the "sorry email" is:

One of the advantages of this method is that even though it won't add anyone after the 10th person the the course, it still updates the increment list. So you now how many people wanted to attend if though only 10 could do so.
Rob
Los Gallardos
If I've answered your question or solved your problem, please mark this question as answered. This helps others who have the same question find a solution quickly via the forum search. If you liked my response, please consider giving it a thumbs up. Thanks.