I wrote "de voitures" instead of "deux voitures", meaning "there were cars on the street". Isn't that correct, too? I guess there's no difference audible between "deux" and "de" voitures in normal day speaking. "Deux" should have a slightly longer "euh" sound than "de", but without comparison it's not differentiable in my opinion.

No, it isn't correct as "ll y avait de voitures dans la rue" makes no sense in French.
"Il y avaitdesvoitures dans la rue" would mean "there were cars in the street", and is a valid sentence, however deux and des do not sound alike and the two sentences do not mean the same thing.

Can't you sometimes use either "de" or "des" for an unspecified amout of something?
Or is "de" only used with un-countable things and "des" with countale ones?
I'm a little confused here when to use "de" and when "des" speaking about some, a few, many, no, ... thinigs in french.

Oh, sorry, maybe I should have mentioned it was a listening comprehension excercise for me, so I did not have the quantity specified in the original task. :)

Like I wrote I understood "there were cars on the street (present)" as instead of "there were some" or "there were (exactly) two".
For me it was just about the general presence of cars on the street, not some, not two.

It's not a big deal, but given this "context", would "de voitures" also be possible? "de" as an unspecified quantifyer, like in "il y a de la farine" ?

Not really as de also means "of" or "from".
However, when speaking of partitives, use du for masculine mass nouns (short for de le), de la for feminine mass nouns and de l' for both masc and feminine mass nouns that begin with a mute h or a vowel.

Do you have access to the Tips & Notes? The information on partitives is under the skill "Food". If not, I posted them in this comment:

No. Il y a de la farine → "There is flour" (de la being the partitive article as farine is a mass or uncountable noun), whereas des voitures is the plural of une voiture. They are totally different.

un/ une are the indefinite articles which, in French (unlike English), has a plural → des. As you are probably aware, 99% (best to say all ) of French nouns require an article. If it cannot be the definite article or the singular indefinite article, then it needs to be the plural indefinite article.

A word of advice, there is absolutely no reason to substitute des with "some" - it is superfluous.

Eg. Les filles ont des robes → "The girls had dresses". There is no need to say "some" dresses.

I'm replying here because I can't reply to your comment down there again, Ripcurlgirl.
Thanks, you're trying very hard with me. :) Have a lingot!
With the "some" thing: it's just how it feels to me, being a native German with English not being my mother tongue. :)
So as a final question - I can only use "de" with mass nouns?