Does China consider India a threat?
Definitely no.
And, India?
Yes. India does see China as a threat but I do not see it so. I do not think China has any territorial designs on India. It refuses to accept old colonial borders and wants corrections. For a number of reasons, India is unable to respond to it. So the stalemate on border continues. Some people who consider China as a threat say that it has set its mind on at least Tawang. Aksai Chin is already under China's control and has not been a threat to India. A kind of compromise should be reached to agree for multi-lateral regional development on borders. Political issues will then become secondary.
Many Indians think that China is threat to their country also because they see China's all-weather friendship with Pakistan. Of course, China has had special relations with Pakistan. During the Cold War, India was an ally of Soviet and China struck relation with Pakistan when they were adversarial to Soviets. US also had a special strategic relation with Pakistan. In recent years, China has shifted away from this lop-sided relation with Pakistan. It is striving to give equal weight, if not more preference, to India against Pakistan, which is not a stable country.
China and Pakistan's ever-growing military and security relations will keep adding to the distrust in India. As soon as the Indo-US nuclear agreement arrived, Pakistan demanded similar help from China.
But, do not forget that China has a big, big worry that India is going to be in American strategic orbit. Recently, you had a quadrilateral relationship of democracies, which is euphemism for military alliance for containment of China. China considers it ideological politics. China is communist but has eliminated ideology from its foreign policy. It is primarily based on its strategic and economic interests. There is a triangle of Russia, China and India, but it is facing difficulty.
I cannot say which alignment will prevail in this region. But, do not count Australia and Japan. Australia is a big continent, but it is relatively a small country with 20 million people, which is equal to one-and-a-half Indian city. Australia has not been able to say no to US but its economic future is intertwined with China. It is a major supplier of Iron ore and gas. Japan's membership was because of design of the Japanese right wing leaders like Koizumi and Abe. I am doubtful if Japan wants to play containment card against China. Japan and Australia are in an advanced stage of economic integration with China.
India is not yet integrated. Amongst all major economy of the world, India is the least integrated in the world economy. So, there is no interdependence. Common interest does not exist between India and China in the economic sense. Once that relation expands significantly, then the political relation is likely to improve as well.
Why did China cozy up to Pakistan? Was it not to counter India?
It has more to do with what the US was doing in South Asia. The US was looking for military alliances to fight back Soviet Union and it found Pakistan willing to join. Few decades back, in the Colombo Conference, it was the Pakistan President who met Zhao En Lai to say that Pakistan is an isolated country, which needs arms and friends against India. It was the US that institutionalised Cold War in South Asia. China and Pakistan alliance came later.
The following years do not tell the same story. What about China helping Pakistan build its nuclear muscle?
Yes, this is an issue. India has responded adequately by conducting the test despite the fact that it is not the member for Nuclear Non-Proliferation Treaty. These are the leftovers of the past that should be corrected.
Also read: Hu envisions the China of 2012