You are correct, but when used with a preposition, you must drop the article (except when you also add some kind of description to the noun). Compare the following two sentences, both correct:
Sunt două cărți pe masă = There are two books on the table.
Sunt două cărți pe masa roşie = There are two books on the red table.
Hope that clears things up a bit :)