title: Django - print length of dict in template
body: <p>I believe this one will be very basic. I am trying to show the number of values in a dictionary on a template.  Here is my method for the template route:</p>
  
  <pre><code># url: localhost/books/home/
  def books_home(request):
      if request.method == "GET":
          first_name = User.objects.get(id=request.session['uid']).first_name
          last_name = User.objects.get(id=request.session['uid']).last_name
          email = User.objects.get(id=request.session['uid']).email
          user_id = User.objects.get(id=request.session['uid']).id
          reviews = Review.objects.filter(created_by=request.session['uid']).order_by("-created_at")[:3]
          context = {
              'first_name' : first_name, 
              'email' : email,
              'last_name' : last_name,
              'reviews' : reviews,
              }
          return render(request, 'html_files/home.html', context=context)
  </code></pre>
  
  <p>Then the pertinent code in the template:</p>
  
  <pre><code>&lt;div class="container"&gt;
          &lt;div class="card"&gt;
              &lt;h3&gt;Information for {{ first_name }} {{ last_name }}&lt;/h3&gt;
              &lt;p&gt;email: {{ email }} &lt;/p&gt;
              &lt;p&gt;Number of reviews: {{ len(reviews) }}&lt;/p&gt;
          &lt;/div&gt;
          &lt;div class="card"&gt;
              &lt;h3&gt;Your recent reviews:&lt;/h3&gt;
              {% for review in reviews %}
                  &lt;p&gt;Review for: &lt;a href="/books/book/{{ review.book.id }}/"&gt;{{ review.book.title}}&lt;/a&gt; by {{ review.book.author.first_name }} {{ review.book.author.last_name }} &lt;br&gt;&lt;br&gt;
                  Your review: {{ review.comments }} &lt;br&gt;&lt;br&gt;
                  Your rating: {{ review.rating }} out of 5&lt;/p&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;
              {% endfor %}
          &lt;/div&gt;
  </code></pre>
  
  <p>I thought that <code>{{ len(reviews }}</code> would do it, since as you can see below, "reviews" has been successfully passed to the context dict. But I am getting a "could not parse remainder" error. Your help is appreciated.</p>