You need to display the number of files only after it has collected them.
You can do it by declaring the filecount variable before the loop, then you need to count and sum the value everytime the loop goes to the next result, and eventually display the total number of files.
Here is how the code should be written:
<?php
$filecount = 0;
foreach(glob("".$filePath."/*.{jpg,JPG,jpeg,JPEG,gif,GIF,png,PNG}",GLOB_BRACE) as $images)
{
$tempFileCount = count(glob("".$filePath."/*.{jpg,JPG,jpeg,JPEG,gif,GIF,png,PNG}",GLOB_BRACE))
$filecount += $tempFileCount;
if ($tempFileCount > 1)
{
echo "<img width='75' height='auto' style='margin-right: 3px; border:1px solid #dddddd' alt='".$row["caption"] ."' src=\"".$images."\">";
}
else
{
echo "<img width='200' height='auto' style='margin-right: 3px; border:1px solid #dddddd' alt='".$row["caption"] ."' src=\"".$images."\">";
}
}
if($filecount > 1)
{
echo '' . $user . ' ' .'added ' . ' ' . $filecount . ' ' . 'new photos';
}
?>