Why don't you use the same idea of the arschema form? Try creating a data form with a schema (form) name field and an integer field to hold the last value used for that form. When you create a record in your form (let's call it form 'A' for now), get the current counter value from your new form, bump it up by 1, and push that value back to your counter form (the new one). This will allow you to use the same functionality across multiple forms, if you need to.
Just a thought.