class Asciidoctor::Document

def increment_and_store_counter counter_name, block

returns the next number in the sequence for the specified counter

block - the Block on which to save the counter
counter_name - the String name of the counter attribute

Public: Increment the specified counter and store it in the block's attributes
def increment_and_store_counter counter_name, block
  ((AttributeEntry.new counter_name, (counter counter_name)).save_to block.attributes).value
end