Just thinking out loud here, I thought of a messy way in which I would accomplish this (and this is by no means Ideal but I think it will accomplish your goal)
-Add a new field in your form called form number
- Republish your form making sure that the form number collumn is promoted and that it is editable outside the form.
-Set your Document library as a data source
-Save a place holder document and filter it out of all views
-Now in the form set the default value of Form Number to max(@Form Number)
(Here is where it gets painfully convoluted and messy)
-Write a SharePoint Designer workflow which will Update the Placeholder Documents form number with max(@Form Number)+1 whenever a item is created in the list.
There are too many moving parts to this solution and I really don't suggest it if there is a lot of traffic with this document library but hopefully you'll be able to glean some ideas from this.
~*"Logic is the cement of our civilization, with which we ascend from chaos, using reason as our guide" - T'Plana-Hath, Matron of Vulcan Philosophy *~