generate_qs function

Calculate desired number of controls per stratum