Usually I've found if you're flying on the same airline, that they generally speaking will wait for you - because on their booking register I guess it shows that they are still waiting on a flight to land and they account for time through customs. If you're going to book via separate airlines, it can be harder - I've missed flights doing that before. I would say around 4 hours is probably a decent time and would account for most delays. When I missed the flight I only had 2 hours between flights and that wasn't enough!