better functioning of the use of distinct and or_where to count results