You may, sometimes, want to be sure about the number of documents that have been scanned and recorded in the metadata database (MetaStore).
First, you will need the ID of the repository concerned. Run the following SQL script (with SQL Server Management Studio for example).
Identify the repository in the list, for example number 3 here and run the following script.
We have now the list of documents recorded in the database. At the bottom right, Management Studio gives you the row count, here 6541 rows.