I'm trying to make a script where a user can add "names" to a list and it will randomly pick a result... Sort of like a lotto.

I'm trying to work out a way for my script to work out how many names have been added. Can you think of a way to count the number of lines in a variable.
For example, if my variable was:
Name 1
Name 2
Name 3
Could my script work out there were 3 names here so I could then make it pick a number between 1-3. (Once I know how to count the lines, I should be right with the rest!

Thanks in advance for your help!

Dominic Fichera