That's a tough question that nobody really knows the answer to.
Standard general relativity works with a 4-dimensional spacetime manifold (3 dimensions of space, 1 dimension of time). In order to get results that make sense mathematically, string theories require the postulation of an additional 6 spatial dimensions (these are the ones that are often characterized as being 'curled up' into tiny balls or other shapes). At the moment, it's not at all clear that it's going to be possible to describe the cosmos we inhabit using a string theory. So, as usual, we're not sure what the situation is as far as the dimensionality of the cosmos is concerned.
(I'm leaving out the stuff about 5-dimensional branes and the like. For one thing, I don't know enough about it, and, for another thing, neither does anybody else, apparently.)
What controls the number of dimensions?