title: How to add additional fields, like count of objects to ModelSerializer with many=True
body: <p>I don't know how to add additional fields to my ModelSerializer, which accepts <code>many=True</code>. Here is all my code:</p>
  <p>ViewSet:</p>
  <pre><code> def list(self, request, *args, **kwargs):
      contracts = self.request.user.all_contracts
      serializer = ContractGetSerializer(contracts, many=True, context={'request': request}, )
      return Response({&quot;results&quot;: serializer.data}, status=status.HTTP_200_OK)
  </code></pre>
  <p><code>ContractGetSerializer</code> serializer. It also has inner <code>Many=True</code> fields</p>
  <pre><code>class ContractGetSerializer(serializers.ModelSerializer):
  files = FileModelSerializer(many=True)
  is_author = serializers.SerializerMethodField('is_author_method')
  contract_signing_status = serializers.SerializerMethodField('get_recipient_signing_status')
  
  def is_author_method(self, foo):
      return foo.owner.id == self.context['request'].user.id
  
  class Meta:
      model = Contract
      fields = ['id', 'is_author', 'title','contract_signing_status','files', ]
  </code></pre>
  <p>Now my <code>ContractGetSerializer</code> returns a ReturnList with all contracts. How can I add additional fields to that ReturnList and make it a dictionary?</p>
  <p>I need for instance to return only <strong>5 recent</strong> contracts (filtered by timestamp).
  Also, I need to add <code>total SIGNED contracts</code>, and <code>total PENDING contracts</code>, counting all contracts data so that my frontend would not need to do this.</p>
  <p>My current JSON:</p>
  <pre><code>    {
    &quot;results&quot;: [
      {
        &quot;id&quot;: 178,
        &quot;is_author&quot;: true,
        &quot;title&quot;: &quot;ahhzhzh&quot;,
        &quot;message_to_all_recipients&quot;: null,
        &quot;contract_signing_status&quot;: &quot;WAITING_FOR_ME&quot;,
        &quot;contract_signing_type&quot;: &quot;SIMPLE&quot;,
        &quot;contract_signing_date&quot;: {
          &quot;start_date&quot;: &quot;2010-09-04T14:15:22Z&quot;,
          &quot;end_date&quot;: &quot;2010-09-04T14:15:22Z&quot;
        },
        &quot;recipients&quot;: [
          {
            &quot;message&quot;: null,
            &quot;recipient_signing_status&quot;: &quot;NOT_SIGNED&quot;,
            &quot;recipient_review_status&quot;: &quot;NOT_REQUIRED&quot;,
            &quot;recipient_action&quot;: &quot;SIGN&quot;,
            &quot;role&quot;: &quot;ADMIN&quot;
          },
          {
            &quot;message&quot;: null,
            &quot;recipient_signing_status&quot;: &quot;NOT_SIGNED&quot;,
            &quot;recipient_review_status&quot;: &quot;NOT_REQUIRED&quot;,
            &quot;recipient_action&quot;: &quot;SIGN&quot;,
            &quot;role&quot;: &quot;BASE&quot;
          }
        ]
      },
      {
        &quot;id&quot;: 179,
        &quot;is_author&quot;: true,
        &quot;title&quot;: &quot;dhhdhd&quot;,
        &quot;message_to_all_recipients&quot;: null,
        &quot;contract_signing_status&quot;: &quot;WAITING_FOR_ME&quot;,
        &quot;contract_signing_type&quot;: &quot;SIMPLE&quot;,
        &quot;contract_signing_date&quot;: {
          &quot;start_date&quot;: &quot;2010-09-04T14:15:22Z&quot;,
          &quot;end_date&quot;: &quot;2010-09-04T14:15:22Z&quot;
        },
        &quot;recipients&quot;: [
          {
            &quot;message&quot;: null,
            &quot;recipient_signing_status&quot;: &quot;NOT_SIGNED&quot;,
            &quot;recipient_review_status&quot;: &quot;NOT_REQUIRED&quot;,
            &quot;recipient_action&quot;: &quot;SIGN&quot;,
            &quot;role&quot;: &quot;ADMIN&quot;
          },
          {
            &quot;message&quot;: null,
            &quot;recipient_signing_status&quot;: &quot;NOT_SIGNED&quot;,
            &quot;recipient_review_status&quot;: &quot;NOT_REQUIRED&quot;,
            &quot;recipient_action&quot;: &quot;SIGN&quot;,
            &quot;role&quot;: &quot;BASE&quot;
          }
        ]
      },
   
    ]
  }
  </code></pre>
  <p>My desired JSON:</p>
  <pre><code>{
    &quot;recents_count&quot;: 5,
    &quot;signed_count&quot;: 10,
    &quot;results&quot;: [
      {
        &quot;id&quot;: 178,
        &quot;is_author&quot;: true,
        &quot;title&quot;: &quot;ahhzhzh&quot;,
        &quot;message_to_all_recipients&quot;: null,
        &quot;contract_signing_status&quot;: &quot;WAITING_FOR_ME&quot;,
        &quot;contract_signing_type&quot;: &quot;SIMPLE&quot;,
        &quot;contract_signing_date&quot;: {
          &quot;start_date&quot;: &quot;2010-09-04T14:15:22Z&quot;,
          &quot;end_date&quot;: &quot;2010-09-04T14:15:22Z&quot;
        },
        &quot;recipients&quot;: [
          {
            &quot;message&quot;: null,
            &quot;recipient_signing_status&quot;: &quot;NOT_SIGNED&quot;,
            &quot;recipient_review_status&quot;: &quot;NOT_REQUIRED&quot;,
            &quot;recipient_action&quot;: &quot;SIGN&quot;,
            &quot;role&quot;: &quot;ADMIN&quot;
          },
          {
            &quot;message&quot;: null,
            &quot;recipient_signing_status&quot;: &quot;NOT_SIGNED&quot;,
            &quot;recipient_review_status&quot;: &quot;NOT_REQUIRED&quot;,
            &quot;recipient_action&quot;: &quot;SIGN&quot;,
            &quot;role&quot;: &quot;BASE&quot;
          }
        ]
      },
      {
        &quot;id&quot;: 179,
        &quot;is_author&quot;: true,
        &quot;title&quot;: &quot;dhhdhd&quot;,
        &quot;message_to_all_recipients&quot;: null,
        &quot;contract_signing_status&quot;: &quot;WAITING_FOR_ME&quot;,
        &quot;contract_signing_type&quot;: &quot;SIMPLE&quot;,
        &quot;contract_signing_date&quot;: {
          &quot;start_date&quot;: &quot;2010-09-04T14:15:22Z&quot;,
          &quot;end_date&quot;: &quot;2010-09-04T14:15:22Z&quot;
        },
        &quot;recipients&quot;: [
          {
            &quot;message&quot;: null,
            &quot;recipient_signing_status&quot;: &quot;NOT_SIGNED&quot;,
            &quot;recipient_review_status&quot;: &quot;NOT_REQUIRED&quot;,
            &quot;recipient_action&quot;: &quot;SIGN&quot;,
            &quot;role&quot;: &quot;ADMIN&quot;
          },
          {
            &quot;message&quot;: null,
            &quot;recipient_signing_status&quot;: &quot;NOT_SIGNED&quot;,
            &quot;recipient_review_status&quot;: &quot;NOT_REQUIRED&quot;,
            &quot;recipient_action&quot;: &quot;SIGN&quot;,
            &quot;role&quot;: &quot;BASE&quot;
          }
        ]
      },
   
    ]
  }
  </code></pre>