Help with IF statement with loop Shell Script

Hello I am very new to shell and I bought some books and trying to learn it. I started trying to write a script that will take a number and count it down to 1 with commas in between. This number can only be one argument. If lower than one or higher than one argument it sends an error message.

Here is an example of the output:

input: countdown.sh 8
output: 8,7,6,5,4,3,2,1

input: countdown.sh 8 2
output: error: program must be executed with one argument.

Here is what I have so far. I am stuck because I am not sure how you differentiate between arguments and values.
Any help would be appreciated.

  #!/bin/ksh
  ###############
  # Script name: countdown.sh
  # Case #1: ./countdown.sh  <integer>
  ###########
  # Assign the first command line argument to the variable NUMBER.
  NUMBER=$1
  # One argument must be provided, otherwise don't execute
  if [$NUMBER > 1]
  then
              echo �error: program must be executed with 1 argument.�
                  exit .....
  elif [ $NUMBER=1]
  while [ $NUMBER -gt 0 ]
  do
     printf .......
     if [$NUMBER -gt 1 ]
     then
       printf ", "
     fi
   NUMBER=$(($NUMBER - 1))
  done
  printf
  

NUMBER=$1
# One argument must be provided, otherwise don't execute
if [ "$#" != 1 ] # $# gives the nb of arguments. There MUST be space after [ and before ]
then
echo �error: program must be executed with 1 argument.�
exit
fi # if You already exited, ther's no need to put any else statement
while [ $NUMBER -gt 0 ]
do
echo -n $NUMBER
if [ $NUMBER -gt 1 ] # Take care of spaces
then
echo -n ", "
fi
NUMBER=$(($NUMBER - 1)) # ((NUMBER++)) should work
done
echo

I replaced the printf by echo which is builtin and there's no need of specific formatting.
Just another way to do the same (FYI)[ "$#" != 1 ] && { echo �error: program must be executed with 1 argument.�; exit; }
for ((i=$1; i>0; i--))
do
echo -n $i
((i>1)) && echo -n ", "
done
echo

Thank you that helped a lot. I have one more question

How do I make this its own line. What I mean is when I execute it prints it with my directory on the same line
./countdown.sh 3
3,2,1/export/home/zero3>

and I want

./countdown.sh 3
3,2,1
/export/home/zero3>

Thank you again.

didn't you forget the echo at the end of the script?

That was it. Thank you very much.