There are many ways to do it. One would be a webservice call in the pre-submit or initialize, depending on when you want it. I add a number on the back end after being submitted.
I am not sure what a webservice call is. By reading online documentation I tried using a variable as a place holder to increase the number by one each time the form is submitted, but that does not seem to work.
A variable in the form can only keep track of data within that instance. If 5 people open it, all 5 will start at the same number. If the form is opened from disk by a single person, submitted, closed and reopened, it starts at the same number again. You have to have some common point of keeping track of the number. So you have to make a server call, webservice, database, etc. It cannot be done within the scope of a stand alone PDF form.