Do you want some or any?

Solution 1:

To me, some implies that you expect to sell several pencils at a time, as you said, possibly because they are packaged as a set.

'Do you want to buy any?' sounds like a more tentative offer. 'I have pencils here if you happen to need one.'