Unified file count variable for image & thumbnail mode