Damien have a look at Arrays: A Tutorial/Reference. The relevant section is "Get count of elements" but it is well worth reading through.
Often you can find your answer by adding a print statement, taking ikegami's example:
print "@name";
# prints x y z
print @name;
# prints 3