There are 10 spots to plant beans, and as such you can only buy 10 beans.
Soft soil locations to plant Magic Beans:
To the right of the shop in Kokiri forest. The shop is the building with the red roof.
In the Lost Woods, two areas left of the first area.
In the Lost Woods, go R,L,R,L,L.
In the Northeast corner of the Kakariko Graveyard
The entrance to Dodongo's Cavern
Right next to the guy that's selling the beans at Zora's River
Next to the Lake Hylia lab
In the Death Mountain Crater (use Bolero of Fire to get to it)
In Gerudo Valley (fall down to a platform on the right side of the bridge and far side of the river)
At the Desert Colossus, right next to the entrance to the Spirit Temple (use Requiem of Spirit)