You should refer to your employment offer letter for the conditions in this regard.
Hope you taken NOC from you employer before applying for this job?
What are the rules governing the technical resignation if you were given NOC by your previous employer.
If your employer has accepted your resignation as technical resignation then you may be entitled for all benefits of past service for all purposes which would include pay protection also.
Kindly refer to your appointment letter which contains the terms & conditions including fixation of pay in present govt. service. Pay protection means protection of basic pay (pay in PB & GP) and not protection of gross salary ("Yield").
Counting of past service is sensu stricto related to the pensionary benefits and, does not always extend the benefits of protection of pay. It depends on the extant rules of the service concerned.
You may refer to Rules of the Central Civil Services (Pension) Rules, 1972 in this regard.