def save(self, *args, **kwargs):
<EOL>created = type(self.pk) is not int<EOL>super(UpdateCountsMixin, self).save(*args, **kwargs)<EOL>if created:<EOL><INDENT>self.update_count()<EOL><DEDENT>
custom save method to update counts