When you upgrade to iOS 4 your iPod gets wiped so yes you will lose your jailbreak apps. Though when upgrading you make a backup of your iPod and then you just restore from your backup after you're done upgrading. I'm not a 100% sure that jailbreak data will be stored in the iTunes backup. You can look at a Cydia app called AptBackup or PkgBackup, I haven't test them but they are supposed to make a backup of all your Cydia stuff.