The rotation number of ODEs with a chessboard structure