Measuring and controlling radio-frequency quanta with superconducting circuits