Show the project id for the documents.
select project_id from documents
For each of id, count the number of documents.
select project_id, count(*) from documents group by project_id