What should I say? “Wie viel Tomaten” or „Wie viele Tomaten”?
Since Tomaten is countable, it should be wie viele. At least if you expect a number as a response. If you are more thinking of it in such a way that a fitting answer would be zwei Beutel or drei Kilo, then I would say that wie viel is permissible.
You will get following answers to your questions: "Wie viel ...?" "Ein Pfund, bitte." -- "Wie viele ...?" "Fünf Stück, bitte." You see in general you should use "wie viel" for non countable things, like sugar, water and so on. If the things are countable you may better ask for the number, like "wie viele". It's exactly the same difference like between how much and how many.
The difference between using "wie viel" and "wie viele" is comparable to many/much. If things are countable (like tomatos), you have to say "Wie viele Tomaten möchten Sie?“. If something is not (directly) countable (like water), you have to say "Wie viel Wasser fließt den Rhein runter?“.