select COUNT(*) from opisy_4 where POZYCJA='20171013142536053342' AND GDZIE<>'bsz_ks' AND DOSTEPNOSC<>'U' AND GDZIE='bg_ks'