While there are some absolute constraints based on the modelling algorithm (i.e., the model will not fit if you are trying to model a large number of parameters [independent variables] with insufficient data points), the biggest constraint is power, as discussed in the paper Thao shared. The ideal sample size is the one that gives you sufficient power to detect the effect size you are expecting. I find it easiest to do power analysis using simulations; the following links have some examples.