Added a filtered function of the count function to the statistics