You need your pages to be .php ones.. and in the place you want it to appear you put..
code:
<?php
function count_files( $dir )
{
$retval = 0;
if( $dir && is_dir( $dir ) )
{
if( ($d = opendir( $dir )) !== false )
{
while( ($f = readdir( $d )) !== false )
{
if( is_file( $dir . "/" . $f ) ) ++$retval;
}
closedir( $d );
}
}
return $retval;
}
echo "We have ".count_files( "/soundpacks" )." sound packs..";
?>
or whatever..