code: private Map<String, Integer> getAttemptsMap(String projectId, String eventCollection) throws IOException {
          Map<String, Integer> attempts = new HashMap<String, Integer>();
          if (eventStore instanceof KeenAttemptCountingEventStore) {
              KeenAttemptCountingEventStore res = (KeenAttemptCountingEventStore)eventStore;
              String attemptsJSON = res.getAttempts(projectId, eventCollection);
              if (attemptsJSON != null) {
                  StringReader reader = new StringReader(attemptsJSON);
                  Map<String, Object> attemptTmp = jsonHandler.readJson(reader);
                  for (Entry<String, Object> entry : attemptTmp.entrySet()) {
                      if (entry.getValue() instanceof Number) {
                          attempts.put(entry.getKey(), ((Number)entry.getValue()).intValue());
                      }
                  }
              }
          }
  
          return attempts;
      }
docs: Gets the map of attempt counts from the eventStore
  
  @param projectId the project id
  @param eventCollection the collection name
  @return a Map of event hashCodes to attempt counts
  @throws IOException