The command is using whmapi1 and jq and needs to run as root.
whmapi1 listaccts want=user --output=json | jq '.data.acct | length'
This command does:
- Pipe the JSON output from
whmapi1 listacctsintojq. - Use
jqto navigate to the array at.data.acct. - Use the
lengthfunction to count the number of elements (users) in the array, effectively giving you the count of cPanel users.