There is no one-size fits all answer to this question as it depends on a number of factors such as type of exercise, intensity of exercise, volume of exercise and your ability to recover from exercise. Therefore the best barometer to use is progress.
So long as your physical performance is improving from one workout to the next you are in the right zone of workout frequency. This could mean lifting a little bit more weight, performing an extra repetition or taking a slightly shorter rest period between sets.
Workout too frequently and your muscles will not have enough time to recover and grow stronger. Therefore your physical performance will not improve.
Workout too infrequently and you will lose some of the positive adaptations from your previous efforts. Again this means you will struggle to improve your physical performance.
In summary, use progress to fine-tune your workout frequency.