Doubts About C Compiler In Unix/linux

As all of you know whenever a program "say a.c" is complied in linux using the gcc or the cc compiler..it shows the list of errors ( if the program contains any).. i want to modify the compier script so as to list the no of errors only and not the description about the error..like" parse error " " missing ("
..... instead i want the compiler to show me " 2 errors "....
how can i do that..can i edit the script..firstly can i view the script......if any one knows the answr do reply to my id
thanx
vrs

cc and gcc are exectuable images, not scripts. You can create makefiles - scripts that tell cc or gcc how to compile and link.

Generally what you are asking doesn't make a lot of sense to me because one single error in syntax or datatype can generate three of four errors from the compiler. Or 15.
Likewise, fixing one problem can remove dozens of errors.

This is a start. Some errors generate sever lines of message text. If you want syntax errors and no link errors try like this:

echo "`gcc -Wall -c myfile.c  2>err.lis; cat err.lis | wc -l` errors"