We present deep observations at 450 \mu m and 850 \mu m in the Extended Groth Strip field taken with the SCUBA-2 camera mounted on the James Clerk Maxwell Telescope as part of the deep SCUBA-2 Cosmology Legacy Survey ( S2CLS ) , achieving a central instrumental depth of \sigma _ { 450 } = 1.2 mJy beam ^ { -1 } and \sigma _ { 850 } = 0.2 mJy beam ^ { -1 } . We detect 57 sources at 450 \mu m and 90 at 850 \mu m with S/N > 3.5 over \sim 70 arcmin ^ { 2 } . From these detections we derive the number counts at flux densities S _ { 450 } > 4.0 mJy and S _ { 850 } > 0.9 mJy , which represent the deepest number counts at these wavelengths derived using directly extracted sources from only blank-field observations with a single-dish telescope . Our measurements smoothly connect the gap between previous shallower blank-field single-dish observations and deep interferometric ALMA results . We estimate the contribution of our SCUBA-2 detected galaxies to the cosmic infrared background ( CIB ) , as well as the contribution of 24 \mu m -selected galaxies through a stacking technique , which add a total of 0.26 \pm 0.03 and 0.07 \pm 0.01 MJy sr ^ { -1 } , at 450 \mu m and 850 \mu m , respectively . These surface brightnesses correspond to 60 \pm 20 and 50 \pm 20 per cent of the total CIB measurements , where the errors are dominated by those of the total CIB . Using the photometric redshifts of the 24 \mu m -selected sample and the redshift distributions of the submillimetre galaxies , we find that the redshift distribution of the recovered CIB is different at each wavelength , with a peak at z \sim 1 for 450 \mu m and at z \sim 2 for 850 \mu m , consistent with previous observations and theoretical models .