public synchronized int getCount(@Nullable final String groupName,
                                   @NotNull final NotificationSource notificationSource,
                                   @Nullable final NotificationCategory notificationCategory,
                                   @NotNull final ProjectSystemId projectSystemId) {
    int count = 0;
    Map<String, Map<NotificationSource, Object2IntOpenHashMap<NotificationCategory>>> value = map.get(projectSystemId);
    Map<String, Map<NotificationSource, Object2IntOpenHashMap<NotificationCategory>>> groupMap = value == null ? Collections.emptyMap() : value;
    for (Map.Entry<String, Map<NotificationSource, Object2IntOpenHashMap<NotificationCategory>>> entry : groupMap.entrySet()) {
      if (groupName == null || groupName.equals(entry.getKey())) {
        Object2IntMap<NotificationCategory> counter = entry.getValue().get(notificationSource);
        if (counter == null) {
          continue;
        }
        if (notificationCategory == null) {
          for (IntIterator iterator = counter.values().iterator(); iterator.hasNext(); ) {
            count += iterator.nextInt();
          }
        }
        else {
          count += counter.getInt(notificationCategory);
        }
      }
    }

    return count;
  }
public synchronized int getCount(@Nullable final String groupName,
                                   @NotNull final NotificationSource notificationSource,
                                   @Nullable final NotificationCategory notificationCategory,
                                   @NotNull final ProjectSystemId projectSystemId)