How many times have you moved OVER the last 5 years?
==> How many tomes have you moved FOR the last 5years?
How are they different? or same?
i think it's the same,both of them is ok.
First one means 'How many times have you moved during the last five years'? though 'over' is not the best term.
The second makes no sense. For + a time period refers to duration
"I have been waiting for 5 years" = The duration of my wait was 5 years.
Taken literally, the second question means 'How many times have you moved, and taken the last five years to do it?'
"Over" is used when something has been happening more or less continually during a period of time.
"I have been studying hard over the past 2 weeks" = I have been spending most of the past 2 weeks sat at home studying, and not doing much else.
Since 'How many times have you moved OVER the last 5 years?' most likely refers to moving house, 'over' is not a good choice unless this particular person has moved house every few weeks or so.
'For' followed by a time clause is used to say how long a continuous action took, which is why the second sentence doesn't make sense - it is asking how many times a move lasted for 5 years, not how many times a move occurred in 5 years
"I have studied for the last 5 years" = I started studying five years ago, and have been doing it from then until now
"I have worked here for the last 5 years" = I started working here five years ago and have been working here until now
"I have taken the exam 3 times in the past 5 years" = In the time frame of the past 5 years, I have taken the exam 3 times