Sampling plan designing for Vial dosages

I wanted to know how do we decide the quantity in sampling plan for all the samples we take for chemical, bioburden, BET, filter flush, sterility etc. For both QC Analytical and micro in in-process and finished good case. Which guideline is this based on?