It all depends on whether you did well in their interview. I once interviewed with google, successfully worked out their coding tests and algorithm problems, but turned down their offer due to the location. 10 months later a google HR person emailed me asking if I would like to consider one of their new opportunities he was recruiting. He specifically mentioned that their record shows I am a technically strong candidate.
With that said, if you did not do well in their technical interview, they also keep the record and may not consider you for other positions for a while. This is to increase their recruiting efficiency.
If you are good, they would always want you regardless of how many times you have turned them down - of course you got to have a good reason each time though.