Counts the number of hamiltonian paths in an n x n grid graph.