Return and then increment value

@mochnatiy please check you proposal.
How a document_number.number can be == 0 if it begins with 1?