How many epochs is enough?
As far I know, no formula.

But have some approaches(can be guidelines), which will help you out in analyzing your requirements.


"training inputs", higher the training data, better the results we can expect.
"number of features", If the number of features are high, model performance can be decreased due to over fitting. We dont have any formula for optimal features identification. If I'm correct l1(lasso) regularization, will do it the same internally and optimize the number of features by setting coefficient values as 0.
Epoch, generally we observe consecutive losses of "n" epochs. If it's not reducing, then we can terminate further training and you best model so far we observed. If model is still not acceptable, then we have to retrain the model with certain changes like review  features selection process, hyper-parameter tuning, algorithm selection and so on.