Thermodynamics of sensing, correlations and computation