..\rebuild build debug release test
 {endterm}
 
+{subsection: counterrs.bat}
+This script processes the build.out or rebuild.out log produced by rebuild.bat and prints a summary of errors and warnings.
+{file: counterrs.bat}
+@echo off
+@setlocal
+set infile=%1
+if "%infile%"=="" set infile=Rebuild.out
+set tmpfile=%infile:.out=%_nopre.tmp
+
+:: extract a sorted list of error/warning messages without the "nn>" prefix on the lines.
+grep -E "C[0-9]{4}:" %infile% | awk "{gsub(/^[0-9]+>/,\"\")};1" | sort > %tmpfile%
+
+:: set variables to conain counts of various things.
+for /F %%I in ('grep -E " [C|E][0-3][0-9]{3}" %infile% ^| sort ^| uniq ^| awk "END{print NR}"') do set errs=%%I
+for /F %%I in ('grep -E " C4[0-9]{3}" %infile% ^| sort ^| uniq ^| awk "END{print NR}"') do set warns=%%I
+for /F %%I in ('grep -E " C6[0-9]{3}" %infile% ^| sort ^| uniq ^| awk "END{print NR}"') do set anals=%%I
+for /F %%I in ('grep -E " C6[0-9]{3}" %infile% ^| grep -I -E "\.h" ^| sort ^| uniq ^| awk "END{print NR}"') do set analhs=%%I
+
+set analmsg=
+if NOT "%anals%"=="0" set analmsg=%anals% Analysis warnings
+set analhmsg=
+if NOT "%analhs%"=="0" set analhmsg=^(%analhs% in headers)
+@echo %infile% Raw  : %errs% Errors, %warns% Warnings %analmsg% %analhmsg%
+
+for /F %%I in ('grep -E " [C|E][0-3][0-9]{3}" %tmpfile% ^| sort ^| uniq ^| awk "END{print NR}"') do set errs=%%I
+for /F %%I in ('grep -E " C4[0-9]{3}" %tmpfile% ^| sort ^| uniq ^| awk "END{print NR}"') do set warns=%%I
+for /F %%I in ('grep -E " C6[0-9]{3}" %tmpfile% ^| sort ^| uniq ^| awk "END{print NR}"') do set anals=%%I
+for /F %%I in ('grep -E " C6[0-9]{3}" %tmpfile% ^| grep -I -E "\.h" ^| sort ^| uniq ^| awk "END{print NR}"') do set analhs=%%I
+
+set analmsg=
+if NOT "%anals%"=="0" set analmsg=%anals% Analysis warnings
+set analhmsg=
+if NOT "%analhs%"=="0" set analhmsg=^(%analhs% in headers)
+@echo %infile% Uniq : %errs% Errors, %warns% Warnings %analmsg% %analhmsg%
+
+if not "%errs%"=="0" @grep -E "[0-9]*[1-9]+ error\(s\), [0-9]+ warning\(s\)" %infile%
+{endfile}
+Example
+{term}
+copy counterrs.bat c:\scratch\build
+cd c:\scratch\build\master
+..\rebuild
+..\counterrs rebuild.out
+{endterm}
+
 {subsection: release.bat}
 run this script while in your build directory (the one with condor.sln) to build and/or release HTCondor. Optional arguments are
 *: debug|retail|RelWithDebInfo - set build type, default is retail