It seems like it should be easy, but I keep getting the following error:

Fatal error: func_num_args(): Can't be used as a function parameter in ../include/standard.php on line 36

My code is as follows:

function add_preload_images()
{
$arg_count = func_num_args();
}

I have removed all of the other (far more interesting) code from the function for simplicity. This function is stored in a library file that I am including into the page using include(). What am I doing wrong here?