Actually, the Ditto copies everything except Max HP, current PP of opponent (Ditto gets 5PP for each of the target's moves, assuming they have at least 5 max PP), and what the target is holding. Smeargle is superior to Ditto for using this move due to higher Max HP. Mew is even better, but is uber and hard to get. As for protect/detect, they use the same counter. The probability of it working = 2^(-n), where n is the number of previous successful uses of protect/detect in a row without any turns spent in between by that pokemon. It always works the first time, has a 50% chance the 2nd time, and a 25% chance the third time, and so on. You can't reliably stall with with either of those moves, and using them both together, like I said, doesn't reset the counter, but adds to it no matter which move you use.