In the parameters of the label layout data source you can define a new parameter called "QTY":
Then you only have to adjust the PQ parameter in your ZPL Label Layout like this:
^PQ$dsparams.QTY$,0,1,Y
^XZ
That's it. In the dialogue of the custom label you will be asked for the quantity of labels: