<?php

$tm07 = "./.scripts/tm07/uploads/";
$tm08 = "./.scripts/tm08/uploads/";
$tm47 = "./.scripts/tm47/uploads/";

$filecount = 0;
$files = glob("{{$tm07},{$tm08},{$tm47}}*.pdf", GLOB_BRACE);

if ($files){
 $filecount = count($files);
}

print $filecount;

?>