Short discussion about displaying PWM and Duty Cycle

Hi!
I didn't quite understand one thing, the frequency of a PWM pin on the Arduino Uno is 500Hz, and the period T = 1 / Freq = 2 milliseconds. For a PWM signal for example 64 (max is 255) does it mean 64 pulses applied to the output pin with a period of 2 milliseconds? Or is the total period of the PWM signal with the value 64?

Below I have a small program for controlling the light intensity of an LED using a potentiometer.

int potPin = A0; 
int control = 0; 
int PWM = 0; 
void setup() {
  pinMode(potPin, INPUT);
  Serial.begin(9600);
}
void loop() {
  control = analogRead(potPin);
  PWM = map(control, 0, 1023, 0 , 255); 
  Serial.print("Analog value: ");
  Serial.print(control);
  Serial.print("Pwm value: ");
  Serial.println(PWM);
 //Serial.print("Duty Cycle  in % is...")
}

How do I calculate duty cycle in % percent?
I accessed a few links but I don't know how to implement on my code.
https://create.arduino.cc/projecthub/boaz/duty-cycle-calculator-and-frequency-meter-f4d763

More details on PWM in this good article

the frequency of PWM is constant (depends on which pin), but that fraction of the time the signal is on (the duty cycle) can be varied between 0 and 100% by changing the dutyValue parameter from 0 to 255 inanalogWrite(aPWMPin, dutyValue);

So if you want to know (integer value) the duty in % you can do

dutyPercent = map(dutyValue, 0, 255, 0, 100);

J-M-L:
More details on PWM in this good article

the frequency of PWM is constant (depends on which pin), but that fraction of the time the signal is on (the duty cycle) can be varied between 0 and 100% by changing the dutyValue parameter from 0 to 255 in

analogWrite(aPWMPin, dutyValue);

So if you want to know (integer value) the duty in % you can do

dutyPercent = map(dutyValue, 0, 255, 0, 100);

Got it! Thanks for your reply.