int CountUsersByNameOrGroup( string searchPattern, NameSearchField searchField, int groupId, bool searchByName, bool includeAnonymous )
Parameters
- searchPattern
 - The search pattern to check against the user table.
 - searchField
 - The name field to check against the search pattern.
 - groupId
 - Id of the group to match (pass zero (0) to count users having no group)
 - searchByName
 - If true match is made for search pattern otherwise it is made on group
 - includeAnonymous
 - If true seach will include anonymous users
 
Return Value
The number of users that match the search.