Good idea, but hard to achieve, I think. Each block, add-on, theme, etc. can save references to a file differently. E.g it may be 'id', 'fID', 'fileID', 'file', 'bg_image', etc... you might get some results by e.g. going through the block output cache, or looking in the btContent table, but it'll never be a solid number. And if it's not a reliable number, it's pretty much useless in this context, I think.
You are allowed to delete your post for 5 minutes after it's posted.