NASA's highest priority future flagship astrophysics mission is a large infrared/optical/ultraviolet (IR/O/UV) telescope, the first in a series of new Great Observatories recommended by the 2020 Decadal Survey. The current concept for this telescope is the Habitable Worlds Observatory (HWO). One of the goals for HWO is to find habitable exoplanets. HWO will obtain spectra and direct images of distant, dim worlds, thus necessitating sensitive instruments. This paper presents instrument requirements and a design for an optical single photon counting photonic spectrograph (SPCPS) based on simulated observations of an Earth-like exoplanet atmosphere. The SPCPS uses emerging technologies: a single photon counting CMOS detector and an on-chip astrophotonic spectrograph, the latter offering a smaller and lighter instrument compared to traditional spectrographs. Using the Earth to simulate exoplanet atmospheric observations, the spectral signalto-noise ratio (SNR) of the O2-A band biosignature at 760 nm is the key criterion for optimizing the SPCPS system. This work assesses design requirements for the SPCPS for exoplanet atmosphere characterization.