How many lines in a variable

Unfortunately it is a textarea where they enter 1 name per line

Is there a way i can get the amount of lines this way?