How can I find out how much space I need?
The ebuild should have told you something like "you need 256MB RAM and 4-6GB space" and even warn you if you don't have enough. I think there's also a portage FEATURE that makes these checks to abort emerge if they fail, instead of just warn. Can't find the feature's name now, though.
And do I get this space back after the compiling
process is finished?
You can get it instantly, remove everything in /var/tmp/portage/ (when you are not emerging something).
Caster