title: Django Rest Framework: Retrieving object count from a model
body: <p>Does anyone know how can I successfully retrieve the object count of a model, in JSON format, and how I need to configure my routing? I'm trying to achieve this using a APIView and returning a Response formatted by JSONRenderer.</p>
  
  <h1>UPDATE:</h1>
  
  <pre><code>@api_view(['GET'])
  @renderer_classes((JSONRenderer, JSONPRenderer))
  def InfluenciasCountView(request, format=None):
      influencia_count = Influencia.objects.count()
      content = {'influencia_count': influencia_count}
      return Response(content)
  </code></pre>
  
  <p>Here's the route I'm using:</p>
  
  <pre><code>url(r'^influencias/count/$', views.InfluenciasCountView, name='influencias-count')
  </code></pre>