How many measurements are enough? Bayesian recovery in inverse problems with general distributions