docs: public int getHistoryCount(int profileId, String clientUUID, HashMap<String, String[]> searchFilter) {
          int count = 0;
          Statement query = null;
          ResultSet results = null;
  
          try (Connection sqlConnection = sqlService.getConnection()) {
  
              String sqlQuery = "SELECT COUNT(" + Constants.GENERIC_ID + ") FROM " + Constants.DB_TABLE_HISTORY + " ";
  
              // see if profileId is set or not (-1)
              if (profileId != -1) {
                  sqlQuery += "WHERE " + Constants.GENERIC_PROFILE_ID + "=" + profileId + " ";
              }
  
              if (clientUUID != null && clientUUID.compareTo("") != 0) {
                  sqlQuery += "AND " + Constants.GENERIC_CLIENT_UUID + "='" + clientUUID + "' ";
              }
  
              sqlQuery += ";";
  
              logger.info("Query: {}", sqlQuery);
  
              query = sqlConnection.createStatement();
              results = query.executeQuery(sqlQuery);
              if (results.next()) {
                  count = results.getInt(1);
              }
              query.close();
          } catch (Exception e) {
  
          } finally {
              try {
                  if (results != null) {
                      results.close();
                  }
              } catch (Exception e) {
              }
              try {
                  if (query != null) {
                      query.close();
                  }
              } catch (Exception e) {
              }
          }
  
          return count;
      }