def _filter_func_regressors_by_participants(participants, age_group):
    """ Filter functional and regressors based on participants
    """
    valid_age_groups = 'both', 'child', 'adult'
    if age_group not in valid_age_groups:
        raise ValueError(
            'Wrong value for age_group={0}. Valid arguments are: {1}'.
            format(age_group, valid_age_groups))
    child_adult = participants['Child_Adult'].tolist()
    if age_group != 'adult':
        child_count = child_adult.count('child')
    else:
        child_count = 0
    if age_group != 'child':
        adult_count = child_adult.count('adult')
    else:
        adult_count = 0
    return adult_count, child_count
