I need a field that automatically increments by one each time a document is added to a library. I have found some awkward work-arounds where a workflow gets a number from a list and adds one and creates a new entry in the list with the new value. The guaranteed concurrency errors this will create are silly at best. In pure DotNET I'd simply use a database sequence, query NextVal and the database handles record locking so even documents added at the exact same second get different numbers.
How do I do this with SharePoint 2013 and/or Nintex and where is it documented?