Incorrect SQL statement when updating the filtercounts