If you have a mac at home you can install the iPodage widget it does what you ask and more. I cut and paste the description from Apple.com, as well as the link. It's pretty cool.
About iPodage A simple widget that tells you how many songs really fit into your iPod or iPhone. You can choose the average song length and the size of your iPod’s heart and it will calculate the possible amount. That’s not enough though! iPodage displays the ‘real’ disk space, lets you select your iPod model and remembers everything!