How many liter boxes should you have and why? Rule of thumb is to have one more box than you do cats. Often there is subtle "bullying" and posturing going on that we don't even notice. A cat that is feeling stressed might sit at the pathway to the litter boxes (looking all calm and normal) as an act of intimidation to the others. If a cat can't access the box when it needs it, they will go elsewhere....likely somewhere you are not happy with.
I have 2 cats (Tabasco the permanent resident, and Marmalade the perpetual foster) and we have 3 indoor litter boxes plus one in the catio - and all of them are used!