There are a couple of ways to achieve what you want:
The first is to provide your function with a default value in the event that one isn't provided - see Xenon's example. In this case, he has set the default value to NULL, then checks against that in the function.
The second way is to use func_num_args() as you tried:
$numargs = func_num_args();
if ($numargs == 0)
die('You must provide a number!');
$num = func_get_args(0); // Gets the first argument
echo "You provided $num !";
This method also allows you to accept an unknown number of arguments if your function needs it.