count command line arguments in shell script code example Example: shell count lines output $ somecommand | wc -l