I was a C Cat gliding instructor with the air cadets a few years ago, they allowed a 10 hour dispensation for the hours I flew towards the total time for my CPL.
Best speak to the issuing authority first to get confirmation though, they will want copies of licences and log book. When I first spoke to the CAA, they weren't entirely sure if it was accepted.