Bar fraction in lenticular galaxies: dependence on luminosity and environment