I'm not sure exactly but I think 18 months. I worked there for four years but was not allowed to join as I was not permanent. I was then told I could join and they started double deductions. I think I was contributing for 18 months before I was let go.
Right, so you worked there 4 years but were only allowed in the scheme last 18 months.
It appears they doubled your contributions to begin backdating them to when you started.
So in effect you have 36 months (18 months x double contributions), so 3 years worth of pensionable service.
The current rule tends to be if you have less then 2 years pensionable service, you can get your pension contributons refunded now, less 20% income tax (which you avoided when you made the contributions).
If you have more than 2 years, which it appears you have, they 'preserve' your pension for you. You can get it when you're 60/65, or via early retirement from 50, though it will be a reduced amount which is calculated via cost neutral early retirement (NCER) tables.
You must ring them to find out if they regard your pension contributions as 18 months or 36 months of service.
Not all pension schemes follow the base model though. Your former employer may have a higher threshold for refunds, such as 5 years.