def METHOD_NAME(scan_id):
    """Return number of newly introduced bugs for particular scan"""
    rgs = ResultGroup.objects.filter(result__scanbinding__scan__id=scan_id,
                                     defect_type=DEFECT_STATES['NEW'])
    try:
        count = rgs.aggregate(Sum("defects_count"))['defects_count__sum']
    except KeyError:
        count = 0
    return count