Lets take an example.
If the graph has 4 vertices(a,b,c,d) and it is complete graph. Hamiltonian graph is visiting each vertex exactly once and return back to starting vertex.
a _b_c_d_ a ...all the permutations of b,c,d is possible since it is complete graph. This permutations done in 3! ways. And b,c,d and d,c,a, all reverse pair counter twice. So, divide it by 2. Ans. Is 3!/2.
For n vertex, answer is (n-1)!/2.