To know what the "next" number is, you'd have to write code to loop through those file names and get the last used number. This would require your form to be full trust, because the code is touching the file system. I would find something else for my unique id. It seems to me that the date / time of the request combined with the project would be unique.
Don't get me wrong - I understand why this is desireable - it is nice to refer to things as "PR 001" or what-have you. But it is challenging to implement - especially to implement well - and there is no reason to add the burden of code to a form for something that is just "nice to have", you know? Especially if you aren't a programmer.
The now() function in InfoPath returns date and time to the second, in a format like this:
2012-10-18T12:14:53
You can use formulas to parse that out into different formats - there is a sample form here you can download that may help you.