added example of using a global counter for an Id