test for number of linked files in template files_by_investigation