Change number of copies x++ when using print management

I have made a modification where I print a sales invoice via x++ code using to print SalesFormLetter.update.  The customer invoice is setup in print management with the number of copies set to 1.  This has worked fine up until now.  I have a new requirement that I need to change the number of copies of the printed invoice based on the type of item being sold.  In my process can I easily determine how many copies to produce, but how can I change the number of copies that will print be created by print management?