Fix mailcount.sh return errorcode when count results in an error