Rihanna has overtaken The Beatles record for the total number of weeks spent at number one in the US.