Please answer a question about the following article about History of India:

Along with the desire for independence, tensions between Hindus and Muslims had also been developing over the years. The Muslims had always been a minority within the subcontinent, and the prospect of an exclusively Hindu government made them wary of independence; they were as inclined to mistrust Hindu rule as they were to resist the foreign Raj, although Gandhi called for unity between the two groups in an astonishing display of leadership. The British, extremely weakened by the Second World War, promised that they would leave and participated in the formation of an interim government. The British Indian territories gained independence in 1947, after being partitioned into the Union of India and Dominion of Pakistan. Following the controversial division of pre-partition Punjab and Bengal, rioting broke out between Sikhs, Hindus and Muslims in these provinces and spread to several other parts of India, leaving some 500,000 dead. Also, this period saw one of the largest mass migrations ever recorded in modern history, with a total of 12 million Hindus, Sikhs and Muslims moving between the newly created nations of India and Pakistan (which gained independence on 15 and 14 August 1947 respectively). In 1971, Bangladesh, formerly East Pakistan and East Bengal, seceded from Pakistan.

How many people migrated between the newly created countries of India and Pakistan?
12 million