Four. (50 points) Color each cell of a $5 \times 5$ grid with one of five colors, such that the number of cells of each color is the same. If two adjacent cells have different colors, their common edge is called a "separating edge." Find the minimum number of separating edges.

Color each cell of a $5 \times 5$ grid with one of five colors, such that the number of cells of each color is the same. If two adjacent cells have different colors, their common edge is called a "separating edge." Find the minimum number of separating edges.