We analyze the complex phenomenology of the nonclassical rotational inertia (NCRI) observed at low temperature in solid 4He within the context of a two-dimensional Berezinskii-Kosterlitz-Thouless transition in a premelted 4He film at the grain boundaries. We show that both the temperature and 3He doping dependence of the NCRI fraction (NCRIF) can be ascribed to finite size effects induced by the finite grain size. We give an estimate of the average size of the grains which we argue to be limited by the isotopic 3He impurities and we provide a simple power-law relation between the NCRIF and the 3He concentration.