@kitten Both are fine, the second one being a little bit more “proper”. (Think “I’m” vs “I am”: It’s not that one is wrong, but it is clear which one would be prefered in formal writing.)
@dpk I wasn't sure if there were any nuances when it's something not countable by itself (like, how you don't pay for each potato but for their weight)
@kitten not personally native german speaker but they seem to me more or less the same as in other languages (except english) p.e. in catalan: Què costen les creïlles? Quant/Molt costen les creïlles?
Both are somewhat common and mean the same, it just seems in German it's a bit more common to use "Was" over "Wie viel"
@kitten These are both correct. Usage differs per person and per region. I personally would use the first one, simply because that’s what I’m used to ^^