Fix: Total user count was negative

ESX version: 6.5
Nextcloud version: 19
OS: Ubuntu 20.04

I configured the LDAP with my AD and disabled 43 unused users from the list. Later, I removed the LDAP settings because the system started to crash, and now those 43 users remain as ghosts. I found in the logs this message: “Total user count was negative (users: 26, disabled: 43)” and in users, disabled users menu it shows me 43 but threre is no list of them.

Can you help me to fix it?
Thanks in advanced

sry, faced the same issue but maybe u solved the problem somehow?)

Did you try to remove the disabled users using occ command?

Depending on the installed system:
sudo -u www-data php /var/www/nextcloud/occ user:delete < username >

see
https://docs.nextcloud.com/server/latest/admin_manual/configuration_server/occ_command.html#user-commands-label
for more commands