Add frame_counter to GenerateRandomNumber