The badge count is one of the parameters that can be sent in an Apple Push Notification payload from the server. The badge count usually reflects an amount of some kind of new data (such as unread emails) that the server knows about and wants to alert the app user about it. Therefore it should be done in the server side. The code that currently always sends 1 in the badge count should be changed to select the correct count.
You can do it in the client (increment it by one whenever a push notification arrives), but that won't be a good idea, because push notifications are not guaranteed to arrive. In addition, it will only be possible if the notification contains an alert in addition to the badge number, and the user taps on the notification to open the app (otherwise, your app wouldn't get the notification data if it's not already running).