title: How many times a number appears in a numpy array
body: <p>I need to find a way to count how many times each number from 0 to 9 appears in a random matrix created using <code>np.random.randint()</code></p>
  
  <pre><code>import numpy as np
  p = int(input("Length of matrix: "))
  m = np.random.randint(0,9,(p,p))
  print(m)
  </code></pre>
  
  <p>For example if length of matrix = 4</p>
  
  <ul>
  <li>[[3 4 6 5]  [3 4 4 3]  [4 2 4 8]  [6 8 2 7]]</li>
  </ul>
  
  <p>How many times does the number 4 appear? It should return 5.</p>