The constituents of the cosmic IR background ( CIB ) are studied at its peak wavelengths ( 100 and 160 \mu m ) by exploiting Herschel/PACS observations of the GOODS-N , Lockman Hole , and COSMOS fields in the PACS Evolutionary Probe ( PEP ) guaranteed-time survey . The GOODS-N data reach 3 \sigma depths of \sim 3.0 mJy at 100 \mu m and \sim 5.7 mJy at 160 \mu m. At these levels , source densities are 40 and 18 beams/source , respectively , thus hitting the confusion limit at 160 \mu m. Differential number counts extend from a few mJy up to 100-200 mJy , and are approximated as a double power law , with the break lying between 5 and 10 mJy . The available ancillary information allows us to split number counts into redshift bins . At z \leq 0.5 we isolate a class of luminous sources ( L _ { IR } \sim 10 ^ { 11 } L _ { \odot } ) , whose SEDs resemble late-spiral galaxies , peaking at \sim 130 \mu m restframe and significantly colder than what is expected on the basis of pre-Herschel models . By integrating number counts over the whole covered flux range , we obtain a surface brightness of 6.36 \pm 1.67 and 6.58 \pm 1.62 [ nW m ^ { -2 } sr ^ { -1 } ] at 100 and 160 \mu m , resolving \sim 45 % and \sim 52 % of the CIB , respectively . When stacking 24 \mu m sources , the inferred CIB lies within 1.1 \sigma and 0.5 \sigma from direct measurements in the two bands , and fractions increase to 50 % and 75 % . Most of this resolved CIB fraction was radiated at z \leq 1.0 , with 160 \mu m sources found at higher redshift than 100 \mu m ones .