A two-level quantum system can absorb or emit not more than one photon at a time. Using this fundamental property, we demonstrate how a superconducting quantum system strongly coupled to a transmission line can be used as a sensor of the photon flux. We propose four methods of sensing the photon flux and analyze them for the absolute calibration of power by measuring spectra of scattered radiation from the two-level system. This type of sensor can be tuned to operate in a wide frequency range, and does not disturb the propagating waves when not in use. Use of a two-level system as a power sensor enables a range of applications in quantum technologies, here in particular applied to calibrate the attenuation of transmission lines inside dilution refrigerators.