When trying to search users when assigning members for a site, the select query searches in database and the count query in the index, which results (because of the wildcards used) in inconsistent results.
Steps to Reproduce:
- In an empty bundle create six users with first name and screen name user1, user2,... up to six (the email will be email@example.com, firstname.lastname@example.org,...).
- Create and additional user with first name and screen name zuser, and email email@example.com
- Go to Admin > Site Administration > Users > Site Memberships > Add Members > User
- Search users using literal u
7 users should be found, and the message should be "Showing 7 results".
7 users are found, but the message is "Showing 6 results".