search count and sort