added counting of parse errors