How to Add Inputs Programmatically?

How would I add an input programmatically?
Example:
Turn
untitled script pic
into
untitled script pic (1)

Do you mean something like this?
script pic

Works with any number.

yeah, thanks!