There many factors which affect the sample size. Your question is not easy to answer in a post but I can introduce you some good books and website links like as
Determining Sample Size: Balancing Power, Precision, and Practicality (This one is pocket but very concise)
Sample Sizes for Clinical Trials (This one is more specializing of calculating sample sizes for many types of clinical trials)
Sample Size Choice: Charts for Experiments with Linear Models, Second Edition (A guide to testing statistical hypotheses of hypothesis testing including power, the general linear hypothesis (multiple regression) problem, and ANOVA)
http://www.surveysystem.com/sscalc.htm
http://www.nss.gov.au/nss/home.nsf/pages/Sample+size+calculator
and last one if you want sample size about SEM (a priori)
http://www.danielsoper.com/statcalc3/calc.aspx?id=89