There’s no need to check $filesCount inside the loop. Both the conditions $filesCount === 1
and $filesCount > 1
give the same action so why do you want to differentiate them? … or maybe I missed something?
Wouldn’t it be better to just use Omeka’s native method like i.e:
echo file_markup($item->Files, array('imageSize' => 'fullsize'));
You can also customize the HTML output of the function as described here.
BTW
I do not recommend to display original files on the item show page. The files can have sometimes a bigger number of MB’s and if an item has them more, the page load time may by significantly slower.