Why are you using the custom field? What if the automation ran twice? Updating 1qty * 3custom = 3 qty, then runs again 3 qty * 3 custom = 9 qty. Seems like you would need another custom field for base quantity. Then a work flow each time the record is saved to set the quantity equal to the base quantity * custom invoice lines count.
Will you have quantity 2 and # times to be invoiced of 3 sometimes? What does it mean when the user sees a quantity 6. What's the difference between quantity 1 * 6 and quantity 2 * 3? Again, it seems like it could be confusing.
Again, perhaps you could consider two custom fields of "custom_count: 2" and "custom_invoices: 3" Then in a workflow set quantity equal to those two custom fields multiplied together. Just a thought. Then on your invoice or pdf receipt, you could be more clear to the customer that the 6 quantity is composed of 2 items over 3 months. Just an idea. I don't really understand the goal.