Your question is not clear, but let me try to answer it on the presumption that you were a member of EPF prior to the Pension Scheme Amendment of 2014. If you join an establishment covered by EPF post-2014, will you be denied a pension?
If the total service, without considering the non-contribution periods upon attaining 58 years of age, is 10 years, you will get a pension. For pension applicability, the service from 1995 is counted. Obviously, all employees now in service would be those who joined post-1995. Any periods during which no contribution was paid will be excluded from the length of service.