Add function to count how many data an error has been created for one day