ScriptErrorCount system variable used to get the number of statements that have caused errors during script execution.