I would like to find a truly general formula for the OLS case, but a couple of observations: Start with $n$ to well-estimate the intercept, e.g., $n=100$, then add $k$ observations per estimated or entertained parameter.  When the signal:noise ratio is low, simulations I have done point to $k=15$.  I'd like to have a formula that takes into account the signal:noise ratio (e.g., true $R^2$).  When this ratio is high you can estimate more parameters.

But we need to decide on the metric for model performance before answering the question.  I don't think that power is the proper metric.  What I prefer, and what the above is based on, is finding $n$ such that the apparent ordinary $R^2$ for the model is an unbiased estimate of the true long-run model performance.

I'm going to expand on this at https://stats.stackexchange.com/questions/10079/rules-of-thumb-for-minimum-sample-size-for-multiple-regression