Thanks @mellouze
I tried it and for some reason Dynamo is not understanding the inputs List.Count and Element.SetParameterByName. It gives me this error:
Warning: Variable ‘List’ hasn’t been defined yet
Variable ‘Element’ hasn’t been defined yet
Do u know how i can fix this?