RefApp Plugin finding users

I’m trying to develop a plugin which can be used by several Atlassian products. At present, my plugin works in Jira and I use UserSearchService.findUsersAllowEmptyQuery() to get a list of users. I have two questions as follows:

  1. Will the same call find users if my plugin is installed in Confluence or another Atlassian product (not Jira) or will this only work in Jira because the UserSearchService class is in the package
  2. Is there a performant way to get the user count, without having to get the full list of users? This is so I can create a pagination mechanism but I’d need to know the user count first.