I studied in Poland for 4 years. How many years count according to:
Art. 212.1. Do 5-letniego okresu pobytu na terytorium Rzeczypospolitej Polskiej, o którym mowa w art. 211 ust. 1, zalicza się: 3)połowę okresu pobytu na terytorium Rzeczypospolitej Polskiej – w przypadku cudzoziemca przebywającego na terytorium Rzeczypospolitej Polskiej: a) na podstawie wizy wydanej w celu, o którym mowa w art. 60 ust. 1 pkt 9 lub 10, lub b) na podstawie zezwolenia, o którym mowa w art. 144 lub art. 187 pkt 1 lit. b
Article 212.1. The 5-year period of stay in the territory of the Republic of Poland, referred to in Article 211 section 1, includes: 3) half of the period of stay in the territory of the Republic of Poland - in the case of a foreigner staying on the territory of the Republic of Poland: a) on the basis of a visa issued for the purpose for which referred to in Article 60 (1) point 9 or 10, or b) on the basis of a permit referred to in Article 144 or Article 187 point 1 (b)
AND
Art. 212.2. Do 5-letniego okresu pobytu na terytorium Rzeczypospolitej Polskiej, o którym mowa w art. 211 ust. 1, nie zalicza się pobytu cudzoziemca: 3) w okresie jego nauki na terytorium Rzeczypospolitej Polskiej;
Article 212.2. Up to the 5-year period of stay in the territory of the Republic of Poland, referred to in Article 211, paragraph 1, the stay of a foreigner shall not be included: 3) during the period of his / her education in the territory of the Republic of Poland;
http://isap.sejm.gov.pl/isap.nsf/download.xsp/WDU20130001650/U/D20131650Lj.pdf