updated example to create a counter for unique identifiers