title: How to count number of times a tag was used and to display it in html?
body: <p>I want to count the number of times a tag was used and to display it.
  I tried this solution, but it displays then the number of tags in a post.
  I understand that i counts like that, because its looking into post for the number of tags used.
  But i don´t understandt how to tell him that he has to look at all posts.
  When i try <code>posts.tag.count</code>, then it shows nothing.</p>
  
  <p>The .html file:</p>
  
  <pre><code> &lt;h1 class="card-title"&gt;{{ post.title }}&lt;/title&gt;&lt;/h1&gt;
                  &lt;p class="card-text text-muted h6"&gt;{{ post.author }} | {{ post.created_on | date:"d M Y"}} | Tag:
                      {% for tag in post.tags.all %}
                          &lt;a class="mycardtext" href="{% url 'tag' tag.slug %}"&gt; {{ tag.name }} {{ post.tags.count }} &lt;/a&gt;
                      {% empty %}
                        None
                      {% endfor %}
                      &lt;/p&gt;
  </code></pre>
  
  <p>I also tried just {{tag.count}}, but it also shows nothing.</p>
  
  <p>With <code>{{ tag | length}}</code> i tried it also, but of course it then shows the length of the tag an not the number of times.</p>
  
  <p>When i try <code>{{post.tags | length}}</code> then it displays an 0</p>
  
  <p>Models.py</p>
  
  <pre><code>class Post(models.Model):
      title = models.CharField(max_length=200, unique=True)
      slug = models.SlugField(max_length=200, unique=True)
      author = models.ForeignKey(User, on_delete= models.CASCADE,related_name='blog_posts')
      updated_on = models.DateTimeField(auto_now= True)
      content = RichTextField(config_name='awesome_ckeditor')
      created_on = models.DateTimeField(auto_now_add=True)
      status = models.IntegerField(choices=STATUS, default=1)
      tags = TaggableManager()
  </code></pre>
  
  <p>Views.py</p>
  
  <pre><code>def tag(request, slug):
      posts = Post.objects.filter(tags__slug=slug)
      return render(request, 'index.html', {"post_list": posts, "slug": tag})
  </code></pre>