Ben Stokes has admitted he feels "lucky" to have escaped more serious harm after being hit in the face by a cricket ball.