How to choose number of epochs

How Can i know the the best number of epochs for my model and how could i increase accuracy?

You could observe the validation loss and use e.g. early stopping.
Also, you could use a threshold to stop the training if the loss decreases less than this threshold.