$# is a special shell variable that expands to the number of positional parameters passed to the script or function. $* and $@ both expand to all parameters (quoted vs unquoted behavior differs), while $? contains the exit status of the last command.