The Advanced Metering Infrastructure (AMI) is a vital element in the current development of the smart grid. AMI technologies provide electric utilities with an effective way of continuous monitoring and remote control of smart grid components. However, owing to its increasing scale and cyber-physical nature, the AMI has been faced with security threats in both cyber and physical domains. This paper provides a comprehensive review of the crucial cyber-physical attacks and counter defense mechanisms in the AMI. First, two attack surfaces are surveyed in the AMI including the communication network and smart meters. The potential cyber-physical attacks are then reviewed for each attack surface. Next, the attack models and their cyber and physical impacts on the smart grid are studied for comparison. Counter defense mechanisms that help mitigate these security threats are discussed. Finally, several mathematical tools which may help in analysis and implementation of security solutions are summarized.