Answer: 1,300 steps
All you need is the length of one step. For an adult walking normally it is about three quarters of a metre, so divide a kilometre by that.
Source: Average step length ~0.75 m (estimate 1,250–1,400 steps)
Answer: 55 beans
Divide the coffee in one espresso by the weight of a single bean. The basket takes about seven grams, one scoop, and a bean weighs a little over a tenth of a gram.
Source: Estimate — 7–9 g of coffee per espresso, one bean ~0.13–0.15 g