is it possible to set the application badge, while the app is in background mode or even closed? I haven't found anything, yet.
From within your application you can use the applicationIconBadgeNumber
property of UIApplication
to set the badge number:
[UIApplication sharedApplication].applicationIconBadgeNumber = 1;
If you want to change the badge without the user launching your app, you need to use the push notification service. The Push Notification Service Programming Guide should have all the info you need.