Find the greatest integer $n$, such that there are $n+4$ points $A$, $B$, $C$, $D$, $X_1,\dots,~X_n$ in the plane with $AB\ne CD$ that satisfy the following condition: for each $i=1,2,\dots,n$ triangles $ABX_i$ and $CDX_i$ are equal.
1. **Understanding the Problem:**
   We need to find the greatest integer \( n \) such that there are \( n+4 \) points \( A, B, C, D, X_1, \dots, X_n \) in the plane with \( AB \neq CD \) and for each \( i = 1, 2, \dots, n \), the triangles \( ABX_i \) and \( CDX_i \) are congruent.

2. **Analyzing the Congruence Condition:**
   For triangles \( ABX_i \) and \( CDX_i \) to be congruent, they must satisfy the Side-Side-Side (SSS) congruence criterion. This implies:
   \[
   AB = CD, \quad AX_i = DX_i, \quad BX_i = CX_i
   \]
   However, since \( AB \neq CD \), we need to explore other properties.

3. **Geometric Interpretation:**
   One of the sides \( AX_i \) or \( BX_i \) must be equal to \( CD \). Thus, \( X_i \) lies on one of the circles with radius \( CD \) centered at \( A \) or \( B \). Similarly, \( X_i \) must lie on one of the circles with radius \( AB \) centered at \( C \) or \( D \).

4. **Intersection of Circles:**
   The intersection of these four circles can have at most 8 points. Therefore, \( n \leq 8 \).

5. **Refining the Bound:**
   Suppose circle \( S_B \) with center \( B \) and radius \( CD \) intersects circle \( S_C \) with center \( C \) and radius \( AB \) at points \( X_1 \) and \( X_2 \). In triangles \( ABX_1 \) and \( CDX_1 \), we have:
   \[
   BX_1 = CD \quad \text{and} \quad CX_1 = AB
   \]
   Since these triangles are congruent, \( AX_1 = DX_1 \). Therefore, \( X_1 \) and \( X_2 \) lie on the perpendicular bisector of \( AD \).

6. **Perpendicular Bisector and Parallel Lines:**
   The line segment \( X_1X_2 \) is perpendicular to \( BC \). Hence, \( BC \parallel AD \), and \( AB \) and \( CD \) are the diagonals or non-parallel sides of a trapezoid.

7. **Considering the Distances:**
   Suppose \( AB < CD \). Then \( BX_1 = CD > AB = CX_1 \). The distance from \( A \) to the perpendicular bisector of \( BC \) must be less than the distance from \( D \) to this line. Otherwise, we get a contradiction to \( AB < CD \).

8. **Intersection Points:**
   If the circle with center \( A \) and radius \( CD \) intersects the circle with center \( D \) and radius \( AB \), then the points of intersection of \( S_B \) with \( S_C \) satisfy the congruence condition. However, the points of intersection of \( S_B \) with \( S_D \) do not. Thus, no more than half of the 8 points of intersection can satisfy the congruence condition, i.e., \( n \leq 4 \).

9. **Example for \( n = 4 \):**
   Consider a regular hexagon \( ABX_3X_2CD \) with \( X_1 \) and \( X_4 \) being the intersections of \( X_2X_3 \) with \( AC \) and \( BD \), respectively. This configuration satisfies the conditions of the problem.

The final answer is \( \boxed{ n = 4 } \).