title: How to sorted the list of model instance by number of an other related model in django REST?
body: <p>I have 2 models is <code>Product</code> and <code>Watch</code>. A <code>Product</code> may have multiple <code>Wacht</code>.</p>
  <p><strong>When I call the API to get the list of products. I want to provide a feature for ordering the products by a number of watches that each product has like below.</strong></p>
  <blockquote>
  <p>domainname/products/?ordering=numberOfWatch</p>
  </blockquote>
  <p>Here is my model</p>
  <pre><code>class Product(models.Model):
      # product model fields
  </code></pre>
  <p>and <code>Wacht</code> model</p>
  <pre><code>class Watch(models.Model):
      product = models.ForeignKey(
          Product,
          related_name='watches',
          on_delete=models.CASCADE,
      )
      # other fields
  </code></pre>
  <p>and the <code>ProductList</code> View</p>
  <pre><code>class ProductList(generics.ListCreateAPIView):
      queryset = Product.objects.all()
      permission_classes = (IsAuthenticated, IsAdmin,)
      name = 'product-list'
      filter_fields = ('category', 'brand', 'seller')
      search_fields = ('name',)
      ordering_fields = ('-updated_at', 'price', 'discount_rate', 'discount')
      ordering = ('-updated_at',)
  </code></pre>
  <p>I'm thinking of add <code>watch_count</code> field in <code>Product</code> model and ordering for that field. But is that a good way to get what I need?</p>