Two issues regarding including capricornlib in updaterescount.php.  First, since this was moved to tools, the include path is incorrect.  Second, there are functions that are redefined in this file that are also in capricornlib.  These functions have been removed
Fixed updateResCount to pass the appropriate arguments to getExamCodeData