You can count dreams: I had a dream, then another, then yet another... three dreams. But imagination seems to be uncountable. Anyway, to find out whether a word is countable or not, and if there are exceptions, you should always look it up in a dictionary.
http://www.ldoceonline.com/dictionary/dream_1
http://www.ldoceonline.com/dictionary/imagination
You can see that they say "imagination" can be countable too and they give the example "Children often have very vivid imaginations", but if you look at all the other examples you will see it's basically always uncountable. Just look up the words you are unsure about and check the examples as well.