Error in Count NQueens code

Pls find error in this.