ok, tk you guys for the information. for now I'm just trying to figure things out.
what I wanna understand is, I see that this is a problem if someone send bitcoins through mtgox wallet or if someone make the payment for you (which seems like a exceptional case, but can't be discarded). but I read that the bitcoin client could become very slow if there's a lot of address in the wallet.
is this true? if so, how much addresses will the qt client supports before becoming slow?
Most people don't have to worry about getting too many addresses in their wallet. There is no number that is "too many", because it depends on your computer.
Basically, for each transactions that comes in (whether by protocol or by block), your node needs to compare the inputs and outputs with all of your keys, looking for matches. The good news is that modern computers are pretty fast. The better news is that we can probably switch to bloom filters or something similar if it gets to be a widespread problem in the future.
People usually only get this problem if they accept tons and tons of incoming payments, like mtgox or other big names, and they understand that they have to find their own solution (for now).
As to your first question about the transaction tracking, looking backward is the only way to find out where coins were in the past, and what you are doing is about the best you can do. There are no features in the system to make this step easier, because it is dangerous, not useful. If you want to follow transactions around the network as an academic or intellectual exercise, feel free. But please be careful that you do not delude yourself into thinking that you have found "the sender", as the concept does not exist in bitcoin. If you need to collect state information about an incoming transaction, you must collect that information in advance and associate it with the payment address that you provide.