The data you're talking about is all stored in XML files, so hypothetically it would be possible. I don't know of any apps made specifically to do that, though, and since it's XML it would be a bit involved to cook up something with POSIX tools.
As far as iTunes goes, the app tells you how many songs are in the library at the bottom of the window.