code: public int getNumberOfUniqueContributors(final int articleID, boolean onlyRegistered)
          throws WikiApiException
      {
  
          try {
              if (articleID < 1) {
                  throw new IllegalArgumentException();
              }
  
              int contrCount = 0;
              PreparedStatement statement = null;
              ResultSet result = null;
  
              try {
                  // Check if necessary index exists
                  if (!indexExists("revisions")) {
                      throw new WikiInitializationException(
                              "Please create an index on revisions(ArticleID) in order to make this query feasible.");
                  }
  
                  StringBuffer sqlString = new StringBuffer();
                  sqlString
                          .append("SELECT COUNT(DISTINCT ContributorName) FROM revisions WHERE ArticleID=?");
                  if (onlyRegistered) {
                      sqlString.append(" AND ContributorIsRegistered=1");
                  }
  
                  statement = connection.prepareStatement(sqlString.toString());
  
                  statement.setInt(1, articleID);
                  result = statement.executeQuery();
  
                  // Make the query
                  if (result == null) {
                      throw new WikiPageNotFoundException("The article with the ID " + articleID
                              + " was not found.");
                  }
  
                  if (result.next()) {
                      contrCount = result.getInt(1);
                  }
              }
              finally {
                  if (statement != null) {
                      statement.close();
                  }
                  if (result != null) {
                      result.close();
                  }
              }
  
              return contrCount;
  
          }
          catch (WikiApiException e) {
              throw e;
          }
          catch (Exception e) {
              throw new WikiApiException(e);
          }
      }
docs: Returns the number of unique contributors to an article based on the people who revised the
  article (revision contributors).
  
  It is possible to only count the registered users, if onlyRegistered is set to true
  <br>
  In order to make this query fast, create a MySQL-Index (BTREE) on the ArticleID in the
  revisions-table.
  
  @param articleID
  ID of the article
  @param onlyRegistered
  defines whether to count only registered users {@code true}, or all users (false)
  @return the number of unique contributors to the article
  
  @throws WikiApiException
  if an error occurs