title: Total count of objects in Django Model
body: <p><em>Using Django ~=1.11 and Python 3.6</em></p>
  
  <p>I am a beginner! Every answer I've found online for my question is more advanced than what I'm looking for.</p>
  
  <p>Here's my model:</p>
  
  <pre><code>class Byte(models.Model):
      text = models.CharField(max_length=30)
  
      def __str__(self):
          return self.text  
  </code></pre>
  
  <p>Here's my view:</p>
  
  <pre><code>def byte_list(request):
      bytes = Byte.objects.order_by('text')
      return render(request, 'cloudapp/byte_list.html', {'bytes': bytes})
  </code></pre>
  
  <p>Here's my template:</p>
  
  <pre><code>{% block content %}
      &lt;div class="total"&gt;
          &lt;h2&gt;Total number of words and phrases entered: {{ byte.count }}&lt;/h2&gt;
      &lt;/div&gt;
  &lt;hr&gt;
  {% for byte in bytes %}
      &lt;div class="byte"&gt;
          &lt;h2&gt;{{ byte.text }}&lt;/h2&gt;
      &lt;/div&gt;
  {% endfor %}
  {% endblock %}
  </code></pre>
  
  <p>This allows the creation "Byte" objects in the /admin, with only one field - a small text field. Right now, the template simply displays a list of all the objects created.</p>
  
  <p><strong>Question/Problem:</strong> I'd like to display the total number/count of objects that have been created for the Byte model. In the template, I have a tag {{ byte.count }} to display this.</p>
  
  <p>I've tried using count() and Aggregation, but not sure how to work those into my model/view/template. I'm looking for the most simple and up-to-date way to accomplish this, whether it's using a method or @property in the model, or some type of query set in the view.  </p>