add query count check to expense processor