To rebuild a damaged iTunes database (without losing your playcounts etc.), normally you just have to drag your iTunes music folder from Finder into the iTunes window.
That makes iTunes re-scan all the contents of the folder, and can help with various problems.
If it's that your song data was ALWAYS wrong, then blame the source of the music files 🙂 Pirated music for instance often is pretty messed up, but MacRumors can't help with that.
And if you're ripping from CD, just make sure you're online when you insert the disc, so the names etc. can be fetched. (Otherwise you get just numbers--but Get Track Names is in the menu.)