The study of critical properties and size transition in a diluted layered XY-model was carried out for the first time. The dimensional dependence of the temperature TBKT(p, N) of the Berezinskii-Kosterlitz-Thouless phase transition on the system thickness N is obtained for a diluted layered XY-model for a wide range of spin concentrations p. The temperature T, concentration p, and dimensional N dependencies of the vortex density v(p, N, T) in a layered XY-model are obtained.