including your box and your party
You can have a total of 960 Pokemon in your boxes.
Add 6 more for your party and you get 966 total Pokémon.
You can hold 966 Pokemon, because 960 capacity in the box, and 6 in your party.
The maximum amount of Pokemon you can have in your party are 6 Pokemon. The maximum amount of Pokemon you can have in your box are 960. Combine those 2, and you can have 966 Pokemon in party and box. You can get 32 boxes if your boxes are full and you have 31 boxes and go into the fight against Eternatus and win and catch it.
Source: https://bulbapedia.bulbagarden.net/wiki/Pokémon_Storage_System and experience