add and increase number for text field input

I'm working on a software which has a batch processing component. You can insert a name for each object you want to create and you can choose how much objects you want to create based on the informations given.

If you name the object test and create it 50 times, you'll have 50 or more objects named test. What I want to achieve is to get test, test-1, test-2, test-3, etc. You know what I mean ^^

Title / name comes from an UITextField as a string, quantity comes from there too as an Integer.