We only consider quantity for "stored codes", for generated codes we send the data to your script and use what it sends us.
Quantity is also used to increase the download limit of a file. So a download link generated when a quantity of 2 is purchased for a product with download limit set to 5, will be good for 10 downloads.