<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def count_unread_messages_for(self, user):
 """ Returns the amount of unread messages for this user :param user: A Django :class:`User` :return: An integer with the amount of unread messages. """

        unread_total = self.filter(user=user,
                                   read_at__isnull=True,
                                   deleted_at__isnull=True).count()

        return unread_total