I find a little memory tool useful, the number 7 is key! If you've got the Key of E Major (has 4 #s), the flat version. EbMajor would have 3 b (4 + 3 = 7). Another example could be D Major, this key has 2 #, so DbMajor would have 5b (2 + 5 = 7 etc etc). I guess you'd at least have to know some of this before anyhow for it to be of any use!