title: UnboundLocalError: local variable 'count' referenced before assignment
body: <p>Throwing error at "count+=1". I tried making it a global etc. and it still gave an issue. It's more of a joke than anything, but I'd like to know why it isn't working. </p>
  
  <pre><code>import math
  def delT():
      #inputs
      #float inputs
      #do math
      #print results
      global count
      count=0
      def getAndValidateNext():
          #print menu
          getNext=input("select something")
          acceptNext=["things","that","work"]
          while getNext not in acceptNext:
              count+=1
              print("Not a listed option.")
              if count==5:
                  print("get good.")
                  return
              return(getAndVadlidateNext())
          if getNext in nextRestart:
              print()
              return(delT())
          if getNext in nextExit:
              return
      getAndVadlidateNext()
  delT()
  </code></pre>