/**
   * Creates query for the given <tt>searchPattern</tt>.
   *
   * @param queryPattern the pattern to search for
   * @param count maximum number of contact returned
   * @return the created query
   */
  public ContactQuery createContactQuery(Pattern queryPattern, int count) {
    GoogleContactsQuery query = new GoogleContactsQuery(this, queryPattern, count);

    synchronized (queries) {
      queries.add(query);
    }

    return query;
  }