A solid AB2 ,where coordination number of A is 8 , would certainly be a flourite structure(e.g. CaF2 ).In a flourite structure A provides the ccp arrangement and B is present in all tetrahedral holes.
so,here as half of the atoms of B are removed,thus number of tetrahedral voids also become half = 8/2 = 4