The usual rule is 1 box for every 4 hens. I have 6 boxes in the big coop for between 15-25 hens depending on the time of year, plus a pet carrier on the ground since sometimes I have broodies hogging a couple of the boxes.
You can see how I did mine in this article.
Article 'The Little, Monitor Coop' https://www.backyardchickens.com/articles/the-little-monitor-coop.76275/