What is the proper magnesium dosage?

Based on a label like this, I’ve seen people say to take up to 500mg, which would be one pill. Or is it 5 pills to get to 450mg? I am confused how much magnesium to take and what the proper effective dosage is.

Based on a label like this, I’ve seen people say to take up to 500mg, which would be one pill. Or is it 5 pills to get to 450mg? I am confused how much magnesium to take and what the proper effective dosage is.