There are no APIs to increment the badge number. You need to store all the state on the server, since the only API you have is to send the full number to display with the app icon. There's simply no other way. You already store the users device token, so you can probably easily add a "badgeCount" attribute to whatever system you use for persistence.
You'll get notified if the user opens the app via the push notifications with application:didReceiveRemoteNotification:
on the app delegate. You can do whatever you want in there to inform your server about the current state of affairs. You might also want to do so in application:didBecomeActive:
etc, in case the user opens the app manually instead of via the notification.