Paginated method to get all items
SQL Injection

You are vulnerable to SQL injection via pageSize. 

You need to use prepared statements for all values, not just some of them. 

Naming

total and getTotalCount could be more descriptive. Currently, I don't really know what "total" means without looking at the code of the function. You also don't need "total" at all (it's assumed when talking about a count). $clientCount = getClientCountForGroup($mysqli, $id) would be easier to understand. 

Duplication

Your two queries are basically duplicates apart from the WHERE clause. You may want to remove that duplication.