title: Count occurrence´s of Element in numpy array (list)
body: <p>i am working on this very simple code to learn about python. My goal is, to have a graph of a binomial distribution that may appear when I roll two dices many many times.
  For that I wrote these lines of code so far:</p>
  <pre><code>    import random
      import numpy
      
      class Dice:
          def roll(self):
              first = random.randint(1, 6)
              return first
  
  
      class Dice2:   
          def roll(self):
              second = random.randint(1, 6)
              return second
     
     
      storage1 = []
      storage2 = []
      for rolling in range(10, 0, -1):
          dice = Dice()
          storage1.append(dice.roll())
          storage2.append(dice.roll())
      
      list1 = numpy.array((storage1)) + numpy.array((storage2))
      
      print(list1)
      
      
      x = 5
      count = 0
      
      for dice in list1:
          if(dice == x):
              count = count + 1
          print(count1)
  
  </code></pre>
  <p>So what I am trying to do here, is to output the count of an Element, in this case x = 5, in other words, how many times I will throw the 5 when I roll 2 dices.
  Especially the last part:</p>
  <pre><code> list1 = numpy.array((storage1)) + numpy.array((storage2))
      
      print(list1)
      
      
      x = 5
      count = 0
      
      for dice in list1:
          if(dice == x):
              count = count + 1
          print(count1)
  
  </code></pre>
  <p>doesn't seem to work, the output is something I don't understand, it outputs something like this:</p>
  <pre><code>[ 2  7  7  8  7  4  7  9 10 10] 
    
  #This is the output from the line: list1 = numpy.array((storage1)) + numpy.array((storage2))
  # so this part I understand, it is the addition of dice1 and dice2, like wished
  
  1
  1
  1
  1
  1
  1
  1
  1
  1
  1
  
  # This is the Output from the loop and finally the print(count1)
  </code></pre>
  <p>I would like to know, how can I store the number of occurrences, any number from 2 to 12 (from rolling two dices) does occur.</p>