file_get_file_reference_count() seems severely broken, and doesn't account correctly for files used in several instance bundles.
For a start, there is a test on $file->file_field_type == $entity_type, *after* the loop that iterates over $entity_type, so the count is completely off depending on the last entity type defined in the loop.
Comments
Comment #1
andypostDuplicate of #808534: file_get_file_references() is completely broken