To manually set the iPhone application icon badge value, use the following code snippet

[UIApplication sharedApplication].applicationIconBadgeNumber = 5;