Added function to count command line arguments

This function will count command line arguments. How neat is that?
It's pretty neat.