Quinten and his friends cut a peach pie into 6 equal slices and ate 4 out of the 6 slices.
First, we determine the fraction of the peach pie that they ate:
\[ \text{Fraction of peach pie eaten} = \frac{4}{6} = \frac{2}{3} \]
Next, we need to find out how many slices of cherry pie they ate given that they ate the same fraction of the cherry pie. The cherry pie was cut into 18 equal slices.
To find out how many slices correspond to \(\frac{2}{3}\) of the cherry pie, we calculate:
\[ \text{Slices of cherry pie eaten} = \frac{2}{3} \times 18 \]
Calculating that gives us:
\[ \frac{2}{3} \times 18 = \frac{36}{3} = 12 \]
Therefore, they ate 12 slices of the cherry pie.
Thus, the answer is 12.