First off, is this email template populated with custom code? Meaning you're creating a macro object openQuantity and assigning a value to it somewhere in code?
Secondly, when you reference the macro, why are you using #openQuantity#? If you've properly created the object using the API, then you simply access it like so without the #:
{% if (openQuantity != 0) { %}
openQuantity: {%openQuantity%}
{% } |(identity)GlobalAdministrator%}