Start the programm with gs nqueens.ps and the run it e.g. with 8 queens = which will output the number of solutions.
gs nqueens.ps
8 queens =