add semantic errors counting