PBP count is bul**** anyways, use a PIC timer for that. It will do the job in background.

From your sampling time you substract the needed time to write to your eeprom.

NOW you have something acurate. Unless, it's pure crap.