How many colors do you need to color countries on a map such that no two adjacent countries have the same color? Only four.
The problem is solved by representing a map as a planar graph. The solution comes from the graph theory.
Unfortunately this is not true for non-planar graphs. Every non-planar graph can be represented in three dimensions and it is possible to connect each vertex with all the other vertices, therefore in the worst case one would need as many colors as there are vertices in order to avoid two interconnected vertices having the same color.
I suspect that this has something to do with the fact that our space is three-dimensional. Not two-dimensional and not four-dimensional. I think there must be some connection. Perhaps three dimensions are sufficient and a fourth dimension of space would be redundant? I am sure some physicist has already thought of it and wrote a nice thesis.