4 balls for general shorts.
usually tennis shorts can hold 4-5 balls.
some of shorts have deeper pockets which might be able to hold 6 balls.
when I made Arrow-up shorts, I made one side for deeper pocket so it can hold 6 balls and the other side for 5 balls ^_^
For the practice purpose, 4-5 balls might be enough space.
For the match, no more than 2 balls.
I was very surprised to see murray dropped a ball from his pocket twice...
I don't know how that happen (usually pocket can hold one ball perfectly