Grid of overlapping squares I have a grid made up of overlapping $3\times 3$ squares like so:

The numbers on the grid indicate the number of overlapping squares. Given that we know the maximum number of overlapping squares ($9$ at the middle), and the size of the squares ($3\times 3$), is there a simple way to calculate the rest of the number of overlaps?
e.g. I know the maximum number of overlaps is $9$ at point $(2,2)$ and the square size is $3\times 3$ . So given point $(3,2)$ how can I calculate that there are $6$ overlaps at that point?

If you are just considering $3\times 3$ squares then the number of overlapping squares at the $(i,j)$ is the number of $1\times 1$ squares (including itself) which are internal neighbours. i.e. neighbouring squares which are not on the edge.
