iTunes Store: Transferring purchases from your iOS device or iPod to a computer - http://support.apple.com/kb/HT1848 - just media purchased from iTunes Store
i-devices are intended to by synced with iTunes (iTunes --> device), not transfer things to iTunes. For transferring songs from i-device to computer see commercial software utilities (with the exception of iTunes purchases). Examples (check the web for others; this is not an exhaustive listing):
Senuti - http://www.fadingred.com/senuti/
Phoneview - http://www.ecamm.com/mac/phoneview/
MusicRescue - http://www.kennettnet.co.uk/products/musicrescue/ - Mac & Windows
Post by Zevoneer: iPod media recovery options - https://discussions.apple.com/message/11624224 - this is an older post and many of the links are also for old posts, so bear this in mind when reading them.