@tflidd thank you for your help. I run the following: find DIR_NAME -type f | wc -l
on the root of nextcloud data and got 589.764. It is far from 1.25million.
If you have versioning and trashbin enabled, there could be more entries for that. Or with sharing perhaps? It’s nearly a factor of 2.
Or check folder individually on number of files in database and on the filesystem. You can also check the file system if the same filename appears twice.