title: How to count the number of prime numbers?
body: <p>I am trying to store the output of the below code into a list</p>
  <pre><code>lower = int(input(&quot;Enter the begining of the range: &quot;))
  upper = int(input(&quot;Enter the end of the range: &quot;))
  print(&quot;Prime numbers between&quot;, lower, &quot;and&quot;, upper, &quot;are:&quot;)
  
  for num in range(lower, upper + 1):
     if num &gt; 1:
         for i in range(2, num):
             if (num % i) == 0:
                 break
         else:
             numlist = []
             numlist.append(num)
             print(numlist)
  </code></pre>
  <p>I am expecting the output to be inside a list <code>[p1, p2, p3,...pn]</code>. However, I end up with the following:</p>
  <pre class="lang-none prettyprint-override"><code>Enter the begining of the range: 1
  Enter the end of the range: 10
  Prime numbers between 1 and 10 are:
  [2]
  [3]
  [5]
  [7]
  </code></pre>
  <p>Is this approach correct or are there better ways to meet the requirement? I am also trying to add a line of code that will let the user that there (4) numbers that are prime between 1 and 10.</p>