Liverpool have confirmed midfielder Philippe Coutinho has moved to Anfield from Inter Milan on a long-term contract.