title: How to show objects count in Django template
body: <p>I have a program that post some places and shows them in a HTML template, but I also want to show the users many of these places I have and I'm wondering how I can reach this.</p>
  
  <p>I have in my models.py:</p>
  
  <pre><code>class Places(models.Model):
       name=models.CharField(max_length=100)
       text=models.TextField()
       website=models.URLField()
       published_date = models.DateTimeField(
              blank=True, null=True)
  
  def __str__(self):
      return self.name
  
  def publish(self):
          self.published_date = timezone.now()
          self.save()
  </code></pre>
  
  <p>in views.py:</p>
  
  <pre><code>def places(request):
       places=Places.objects.order_by('-published_date')[:10]
       return render(request, 'templates/places.html', {'places':places})
  </code></pre>
  
  <p>and the html template:</p>
  
  <pre><code>&lt;div class="container"&gt;
  &lt;h2&gt;Places&lt;span class="badge"&gt; HERE'S WHERE I WANT THE NUMBER OF PLACES&lt;/h2&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>I hope you can help me out. Thanks for the answers</p>