Sphere does not currently have a capacity to limit the number of Discount Codes used based on the entire event.  Each Registration Type can allow for a maximum number of codes to be used for that specific Registration Type, but not for an overall event.