OF for the Mac counts items in the Inbox when determining the value and color of the number for the badge. An overdue item in the Inbox will force the badge number to be red and increment the count by one. A due soon item in the Inbox will force the badge number to be orange if there are no overdue items in any of the active projects in the database, and will increment the count of due soon items by one. If there are no overdue or due soon items anywhere in the database (lucky you!) then items in the Inbox will cause the badge count to be gray and the count will be the number of items in the Inbox.
As CatOne said, there's currently no way to get OF for the Mac to do the summing behavior that the iPhone version offers. If you think that would be a good addition, use Help->Send Feedback to request it.
OF on the iPhone does count items in the Inbox when doing the badge computation. It is perhaps worth noting however that the Inbox badge on the iPhone is always gray, even if you have a due soon or overdue item in the Inbox, and always shows the total count of items in the Inbox. This behavior is different than that of the badges on the desktop, which show the count and color of the overdue items, if any, followed by due soon items, if any, and finally just the count of items.