sort result by count and after by login