Microsoft has sold more than five million Xbox One gaming consoles to retailers, trailing rival Sony.