There are 5 million vending machines (jidohanbaiki - 自動販売機) in Japan. That's one for every 25 people.
They are everywhere. I have yet to find one that was vandalized, or that did not work properly. Far and away the most common vending machines are for soft drinks: a dazzling array of coffees and teas, both hot and cold, a limited range of "colas", various juices, "sports" drinks (such as the unfortunately named Pocari Sweat).
Alcohol vending machines are easy to find, dispensing primarily beer and sake from 5am-11pm, and there are over 600,000 cigarette vending machines.
Other items I've seen dispensed by machine are uncooked rice, batteries, condoms, newspapers, "Casual Food" (fried chicken, hamburgers etc), ice-cream, pornographic magazines and videos, and "used" schoolgirls' panties.
Strangely, I haven't come across any machines vending chocolate or candy bars.