Tradermath logoBrainteaser - Squares of a Chessboard

Squares of a Chessboard
Reasoning
Optiver, IMC
How many squares are there on a chessboard? (Note that the answer is not 64!)

Additionally, can you calculate the number of rectangles on a chessboard?