This is a bit crude - just trying to see if it works for you
It will create a text file on your desktop listing the images that are duplicated and what pages they are on
var allLinks = app.activeDocument.links;
var imageLinks = {};
for (var i = 0; i < allLinks.length; i++) {
var linkName = allLinks[i].name;
var parentObj = allLinks[i].parent;
var pageNum = parentObj.parentPage.name;
if (!imageLinks[linkName]) {
imageLinks[linkName] = [pageNum];
} else {
imageLinks[linkName].push(pageNum);
}
}
var file = new File("~/Desktop/image_links.txt");
file.open("w");
for (var linkName in imageLinks) {
if (imageLinks[linkName].length > 1) {
file.writeln(linkName + ': Pages ' + imageLinks[linkName].join(', '));
} else {
file.writeln(linkName);
}
}
file.close();
alert('Image links have been saved to the file "image_links.txt" on your desktop.');