for every form_errors in self.errors sum length of return value of the method self.non_form_errors and length of form_errors, return the result.
return len ( self . non_form_errors ( ) ) + sum ( len ( form_errors ) for form_errors in self . errors )