In an $n$-dimensional manifold, can we say it has $n-k$ compact and $k$ noncompact dimensions? In theoretical physics it is quite common to talk about the number of compact and non-compact dimensions of a manifold, or even about compactified dimensions, and indeed often it is quite clear what is meant, like in a Cartesian product of a compact manifold with $\mathbb{R}^k$. Can this actually be defined in somewhat general terms?
As a first step, maybe we can say that the compact dimension is the maximal $k$ so that $M$ can be written as a product $K\times V$ where $K$ is a compact $k$-manifold, or locally so, as in a fiber bundle with base space either $K$ or $V$.
Is it possible for a general $n$-manifold (or a general differentiable manifold) to say how many compact and how many non-compact dimensions it has?
I would also be very interested in any example where it is not immediately clear how many dimensions we'd like to call compact and how many non-compact.
EDIT
It may make sense to add some more restrictions, like completeness for a (pseudo)-Riemannian metric. If not, a once-punctured sphere would probably have to be considered as having no compact dimensions, and a twice punctured sphere as having $n-1$ compact dimensions.

As Lee Mosher pointed out, it's probably not possible to come up with a completely general definition of the "number of compact dimensions" in an arbitrary manifold. But I think what physicists generally mean when they say a manifold $M$ has "$n−k$ compact dimensions and $k$ noncompact dimensions" is that $M$ is diffeomorphic to a fiber bundle with fiber dimension $n-k$ over a base manifold of dimension $k$. Every product manifold is an example, but nontrivial fiber bundles are not globally expressible as products. Some examples that occur in physics are Kaluza-Klein models (whose fibers are circles), Yang-Mills theories (whose fibers are compact Lie groups like $\operatorname{SU}(3)$), and superstring theories (whose fibers are $6$-dimensional Calabi-Yau manifolds).
