I have a check that checks how many files are missing in the database. Everything works but when my code runs and outputs the results, there are 3 files missing but it is displayed like "+1+1+1".

The code I am using is errcount=$errcount+1

Why does the code not accumulate the results?