Ed Sheeran thinks Pharrell Williams is psychic.

The 'Drunk' hitmaker and producer collaborated on Ed's new track 'Sing', which became his first UK number one at the weekend, and he reckons its success is all down to Pharrell's clairvoyant ability after he made him change his mind about which song to release.

Ed, 23, told the Daily Star newspaper: ''I swear Pharrell has special foresight. I said I wanted to release 'Don't' [from the new album] as the first single.

''He said it should be 'Sing' and it would do over 100,000 in the US and sure enough it's doing 140,000. I owe him a hat or something.''

Ed, who will release his second studio album 'x' this month, also appears in a new MTV documentary 'Nine Days And Nights Of Ed Sheeran', which gives fans a rare insight into the singer's life.

In the film, the star explains how pirates lured celebrated producer Rick Rubin onto working on his new album.

Ed explained: ''Rick came to my birthday gig and I was dressed as a pirate.

''I was summoned by Elton John to meet him, so it was us and Adele. I felt awkward dressed as a pirate.

''Six months later he was listening to my album and telling me: 'You shouldn't be doing it like this' or 'Sing it like this.'''

Ed's new documentary 'Nine Days and Nights of Ed Sheeran' which air on June 20 on MTV.