On OS X, is there a way to ask iTunes for all the tracks it has, with some metadata (I'm most interested in the number of plays), and the filenames of the tracks (alternatively, simply a way to play them would be fine as well).
I know I could probably hack something up reading the iTunes database, but I'm looking for a solution that is not considered off-limits for acceptance into the Mac App Store.
Is this possible?