From Finding the diagonals of an n-sided polygon,
we know that an $n$-sided regular polygon ($n \geq 3$) will have $\frac13 n(n-3)$ diagonals altogether.
If $n$ is even, then $n\geq 4$ and from any given vertex, there is one and only one "longest" diagonal that connects to that vertex. We can identify the following subsets of vertices: the $2$ vertices at each end of the diagonal, $\frac12(n-2)$ vertices on one side of the diagonal, and $\frac12(n-2)$ vertices on the other side of the diagonal.
We can then partition the vertices into $\frac n2$ sets of two vertices connected by longest diagonals. There is exactly one longest diagonal for each of these sets of two vertices. Hence there are exactly $\frac n2$ longest diagonals.
For every other diagonal in any regular polygon, there will be more vertices on one side of the diagonal than on the other. Choose $k$ such that $0 < k < \frac12(n-2)$;
then $k < n - 2 - k$ and from any given vertex there are two diagonals that each have $k$ vertices on one side and $n - 2 - k$ on the other.
Each vertex is connected to two such diagonals but each diagonal connects two vertices, so the number of diagonals is the same as the number of vertices.
If you're not familiar with that kind of reasoning,
starting any given vertex traverse the perimeter of the polygon counterclockwise through $k$ other vertices and then stop at the next vertex; construct a diagonal through the starting vertex and the stopping vertex, and this diagonal has exactly $k$ vertices on one side. Each vertex gives you exactly one such diagonal, and every diagonal is produced by exactly one such vertex (you get a different diagonal if you start at the other vertex), so there are exactly as many such diagonals as there are vertices.
For $n \geq 5$ we have $n$ diagonals with one vertex between the ends of the diagonal. (We need $n \geq 5$ because in the case $n = 4$ there are only two such diagonals and for $n < 4$ there are none.)
For $n \geq 7$ we have $n$ diagonals with exactly two vertices between the ends of the diagonal. For $n \geq 9$ we have $n$ diagonals with exactly three vertices between the ends, and so forth.
So, in summary, in a regular $n$-sided polygon, we have the following diagonals:
Altogether there are $\frac12 n(n-3)$ diagonals of all lengths.
If $n$ is even, there are $\frac n2$ longest diagonals.
For any diagonal that is not a longest diagonal of polygon with an even number of sides, there are $n$ diagonals of that length
(where the "length" can be identified by counting the number of vertices on one side of the polygon, choosing the side with the smaller number of vertices).