I think I remember reading somewhere that there are limits to how much you can upgrade a windows 7/8 computer without having to buy a new windows license. After some googling I can't find any information on this. Is there a limit to how much you can upgrade your laptop? If so, will replacing ram (2x 1.5gb to 2x 4gb) and a hd (from 160gb hd to 256 gb ssd) be ok?
I've never heard of a limit to upgrading your computer (minus the motherboard exception below) and doing so with most components on a computer will not nullify your Windows 7/8 license at all. These components included RAM, hard drives (or SSDs), GPUs, CPUs, and even fans. So replacing your RAM and HD will give you no problems at all in regards to your OS install (other than perhaps a re-install of the OS if you are replacing the primary drive). I've done this many times with not only an OEM copy of Windows but also with the manufacturer's disc that came with a computer.
You usually only run into problems when you replace the motherboard completely. Depending on the type of Windows you have (ie OEM or from a certain company like Dell), you may not be able to use the same activation key because Microsoft defines a "computer" as that specific motherboard that is piecing everything together. From personal experience, I've been able to replace my motherboard without having to buy a new license completely.
For more information on replacing the motherboard, this Microsoft Community answer helps to explain it in greater detail.
Also for reference, the personal experience comes from working with Windows XP, Vista, and 7, but not with 8.
You should not have an issue with HD and RAM and even if it asks to reactivate, it is a simple process. Worst case is you have to call MS and explain what changed.
I have done this several times and it is usually very quick and painless.
However, if basically all parts were changed, it might be an issue for an OEM license. With a laptop, it is normally impossible to completely change enough parts as motherboard is proprietary.
"The activation limit for OEM preloaded Windows 8 or 8.1 is high, about 50"
I was paraphrasing there, but that's what a Microsoft Answer Tech told me.
P.S. I would've written this answer in the comments section, but it seems you need 50 reputation to do that.