I forgot to explain why...oops...
In the first example, $number_of_childen is taken in scalar context and that is why you end up with the number of elements as the value. By adding the ( ) around the variable name it changes to list context which is why you end up with the first array element (an array is a list of values).
In the first example, $number_of_childen is taken in scalar context and that is why you end up with the number of elements as the value. By adding the ( ) around the variable name it changes to list context which is why you end up with the first array element (an array is a list of values).