Set the # of records that are created by counting an array

Scenario:

  • A business is adding a “building” to our dataset, each building may have Studio, 1 Bedroom, 2 Bed, 3 Bedroom layouts in it. This is set up as a multiselect checkbox on my form

  • Based on the number of checkboxes selected in the previous step, I want to COUNT the number of checkboxes selected so I can use that as the variable for my Repeater module to create the # of records in a new dataset based on the number checkboxes selected

  • Example: If Building has ‘1 Bedroom’ & ‘3 Bedroom’ units available, I want to create TWO new records in my airtable dataset

I have attached what output I receive when submitting my form (in this scenario I selected 4 options, so it should create 4 new records)

Screenshot 2023-01-21 140729

I realize there might be a better way to achieve what I am looking for.
This is what I have currently set-up, any help would be much appreciated!