correct count for table (fixes #4215)

sort by name the search collection