Liverpool came from behind to beat West Ham 3-2 at Upton Park, much to the delight of Brendan Rodgers.