On the number of periodic reflecting rays in generic domains