India and Pakistan have fought three wars since partition in 1947 .