title: How do I get a counter to work within a discord.py command function?
body: <p>How do I get a counter to increase within a command function? For example:</p>
  
  <pre><code>global counter
  counter = 0
  @client.command(pass_context=True)
     async def pick(ctx):
     counter += 1
  </code></pre>
  
  <p>Every time I try to do this, it gives me this error: 
  <strong>UnboundLocalError: local variable 'counter' referenced before assignment</strong>
  I have tried so many ways to get this to work but I can not figure it out to save my life as well as my loved ones. </p>