ditonet is correct.
The "number" attribute you see when printing in the terminal (i.e. 9 in your script) is not a configuration item on the nat rules. They are generated during a print command only. To set or get any values in a script you should always use the [find] command to narrow your results. [find] by itself would return all nat rules in this case, [find comment="blah"] would return only those with that exact comment, [find comment="blah" chain=forward] would return... well you probably get it by now.
If you cannot find it dynamically/uniquely using attributes set within the rule, then I do exactly what ditonet suggests, give it a unique comment and [find] it by that.
- If I helped you solve your problem... I am now able to accept tax-deductible Karma donations!