I have 2 classes of the model and I need to get the number of products from each of the suppliers
class Vendor(models.Model): name = models.CharField(max_length=50, unique=True) seo_name = models.SlugField() product_count = models.IntegerField(default=0) class Product(models.Model): vendor = models.ForeignKey(Vendor, unique=False, blank=True, default=None, null=True, on_delete=models.SET_NULL) How to do it?