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 listaccts
intojq
. - Use
jq
to navigate to the array at.data.acct
. - Use the
length
function to count the number of elements (users) in the array, effectively giving you the count of cPanel users.