A single-electron transistor operation of a quantum dot fabricated in a GaAs/AlxGa1-xAs heterostructure crystal is demonstrated to serve as a photon detector of the far infrared and microwave ranges of electromagnetic waves. When the single quantum dot is placed in a high magnetic field, the resonant conductance through the single-electron transistor switches on (off) upon the excitation of just one electron to a higher Landau level inside the quantum dot, enabling us to detect individual events of far-infrared photon absorption (λ = 0.17 - 0.22 mm). Additionally, single-photon counting in the microwave range (λ = 0.6 mm) is demonstrated by using parallel quantum dots without magnetic fields. A point contact separating the double quantum dots allows the prompt escape of an excited electron from one of the quantum dots to another. The resulting long-lived photoinduced ionization of the quantum dot is detected as a charge in the single-electron transsitor.