In Linux there is a variable available to holds the length of arguments.
The variable is $#.
Write a script t.sh as following
Now save and exit form script.
To execute the Script run the following code on your terminal.
$ sh t.sh 1 1 1
The output after executing above command is 3, since the number of arguments we passed to the script t.sh are 3.