TITLE: Can a Morse function define a unique structure on a closed manifold?
QUESTION [6 upvotes]: I was thinking about the doubt that if $M$ and $N$ are closed manifold and if there exists two Morse function $f$ and $g$ respectively on $M$ and $N$ with the following property that they both have same number of $i$ index critical points for each $i\in \mathbb N$, then whether I can conclude they are homeomorphic or not. 
It is clear that they are of same dimension since the maximum of $f$ and $g$ are of same index. And we know that if a closed manifold has exactly two critical points then it is homeomorphic with $S^n$.
But still I don't expect an positive answer for my doubt. So to find a contradiction I was thinking about handle decomposition of some closed manifold. And now I got stuck with this doubt that suppose I have a handle decomposition of a closed manifold $X$, then can I construct a Morse function $f$ on $X$ such that corresponding to this Morse function I get the same handle representation?? This is kind of converse of Morse handle presentation theorem. So far I could not able to construct such a function. 
And also I could not able to find any counter example for my initial doubts.
It'll be very helpful if someone clarify my these two doubts.

REPLY [4 votes]: In answer to your second question, yes, given a handle decomposition it is possible to find a Morse function whose corresponding handle decomposition is the same as the one you started with.  I think there's a proof, via "gradient-like vector fields", in Milnor's book on Morse theory (though I don't have a copy in front of me now).