I think when we have a Hamiltonian cycle since each vertex lies in the Hamiltonian cycle if we consider one vertex as starting and ending cycle . we should use 2 edges of this vertex.So we have (n-1)(n-2)/2 Hamiltonian cycle because we should select 2 edges of n-1 edges which linked to this vertex.