In a legal position, how many times can the king and its surrounding squares be attacked? There is a total of 9 possible squares to be attacked-the square the king is on and the eight squares surrounding it. The final tally is the added total of the number of times each of the nine squares is attacked.
As @Brian Towers anticipated, here is 55 attacks.
[FEN "B7/1R2n3/3Q1Q2/2Q3Q1/2N1k1K1/1R4Q1/1BNQNQN1/8 w - - 0 1"] [startply "2"] 1. Rxe7#
But given the loose ruleset, both sides can attack; I found 83.
[FEN "8/3Nnn2/1bnQqQb1/1r4Q1/1nq1k1qN/1R4Q1/1BNQqQB1/2K1Nn2 w - - 0 1"]
Proof of legality: 1. a4 b5 2. h4 g5 3. c4 d5 4. f4 e5 5. cxd5 bxa4 6. fxe5 g4 7. Rh3 gxh3 8. h5 Nf6 9. h6 Rg8 10. e6 Rg7 11. hxg7
Just for fun, here is an illegal and one-sided 88 attacks. Any piece swap will do for both colors.
[FEN "8/2NNNNN1/1NNQQQNN/1NQ3QN/1NQ1K1QN/1NQ3QN/1NNQQQNN/2NNNNN1 w - - 0 1"]
There seems to be some confusion understanding the problem, so I will post an answer, probably not the maximum, and then somebody better than me can post the best solution.
I've promoted 7 pawns to queens and one pawn to a knight.
[fen "R7/7b/3qnq2/2q3q1/2n1K1n1/2q3q1/3q1q3/7k w - - 0 1"]
Each of the 8 queens attacks 5 squares around the king = 40 Each of the 3 knight attacks 2 squares around the king = 6 The bishop attacks the king and 1 square around the king = 2
Total = 48