fix date range for old perl, count tax exempt and COMP customers correctly