ADD and Subtraction of seats after event registratio

I need to create a Registration, for that, I should be able to show the total number of seats and after the event registration , there should be a minus in the seat count, for example, total seats = 80, If I register for 5 seats , there should be a minus in the  seat count . how can i do that ?      
1 answers

You can do this by making 3 different variables:

- Total seats

- Registered seats

- Open seats


You can store these in an entity and using a microflow you can apply logic to it, for example:

- Total seats is filled while making the registration object

- Registered seats is incremented each time someone registers

- Open seats is calculated by subtracting Registered Seats from Total seats and using the outcome of that to fill / update Open Seats