I would argue that developers should aim for 0 error messages ever. If your software requires an action to be performed before moving on, then redirect them to the action, highlight the point of interest, and give a little alert at the top that tells them what to do. When you have a scary error message, users get scared.
In this case I'm talking about software I didn't develop. Also, developers are not immune to this. Very often it is a compiler or runtime error that tells you where the issue is and sometimes even how to fix it. Person/developer sees a red message and panics before attempting to resolve.