A few ways to purchase cigarettes in Japan are as such-
Vending machines now require a TASPO card which you have to be a resident in Japan to aquire. This card is to certify that you are of age to purchase and smoke cigarettes. All cigarette vending machines are now equipped with the TASPO card function.
An example of the taspo card.
The next way is to purchase from a convenience store like lawson, family mart or 7/11.
Most convenience stores sell cigarettes that they label by the number. It may be a little difficult for non-Japanese speaking people to buy cigarettes over the counter, however the cigarettes are usually displayed in a wide array where the customer is able to just point.
The last way is to buy through a cigarette vendor. They carry a large variety of cigarettes, even some uncommon/rare brands that most people do not smoke.
They are usually ran by traditional Japanese people that don’t understand much English. However these stores usually give out goodies like specific lighters, keychains and such when purchasing their cigarettes. Think of it as a GWP (Gift with Purchase).