Double counting

What is double counting and why must it be avoided when measuring GDP? How do statisticians avoid the problem? Provide examples and explain your answer.