Just never say the number alone and the problem is gone. That's how I do it in order to avoid any double meaning. I am Swiss and pronounce it both ways, either "sex" or "sächs".
At the gas station: Nummer sex / Ich zahle Nummer sex
At the post shop: sex Briefmarken / Ich möchte sex Briefmarken
In the office: Q: How many XY do you want? A: sex Stück / sex Kopien / sex Teile / sex XY / ...
Kudos for the effort to pronounce correctly, however I would advise that you should not be bothered by prude jack@rses who smirk at the word sex ( I say that even though I might be one of those j....ses )
Gotta be careful with the word Schwül. I asked my cousin once, bish Schwül? He turned around and punched me in the face. Apparently, Schwul (without umlaut) is a derogatory word for homosexuals