Project -> Compiler Options -> Verbosity (or Message in Lazarus < 0.9.27) -> Stop after number of errors.
Ok. It seems that the compiler option dialog is a bit broken, Show Options doesn't show it. You can try to add it in the Other tab -> Custom options: "-Se1000"