Each of the n vertices connects to n-3 diagonals
The -3 is to exclude the two surrounding neighbors (which don't form diagonals but rather exterior sides), and the vertex itself.
There are n(n-3)/2 total diagonals.
The dividing by 2 aspect is to avoid double-counting
Eg: diagonal AC is the same as diagonal CA.
Plug in n = 7 to find that,
n(n-3)/2 = 7*(7-3)/2 = 7*4/2 = 28/2 = 14