Consider coloring the squares of the chessboard so that 32 are black and 32 are white, and no two squares of the same color share a side. Then a knight in a square of one color only attacks squares of the opposite color. Any arrangement of knights in which all 31 are placed on the same color therefore works: there are 64 such arrangements (one for each square, in which that square is empty and the others of the same color are occupied). Also, if a knight is placed in a corner, it only attacks two squares. Therefore, for each corner, it is possible to place a knight in one corner and in all squares of the opposite color except the two attacked by the corner knight. This gives 68 total arrangements. One can prove that no others are possible.
How many ways are there to place 31 knights in the cells of an $8 \times 8$ unit grid so that no two attack one another?