the solution of the n queens problem (count number of solutions for a particular board size)