As of the 9th of September 2014, there are 193 Member States of the United Nations. The criteria for UN membership are set out in Chapter II, Article 4 of the UN Charter. A country must be accepted by nine of the 15 members of the UN Security Council, including all five permanent members, and must then also be approved by a two-thirds majority vote of the UN General Assembly.
Beyond the membership of the UN General Assembly, things get a little more subjective. Different states grant recognition to different countries. Take Kosovo, for example: it cannot become a UN Member State as its independent existence is not recognised by Russia or China, both permanent members of the UN Security Council. However, as of the 9th of September 2014, it is recognised by the United States, 23 out of 28 members of the European Union (one notable exception being Spain), and many other UN Member States.
The granting or withholding of official recognition is often used as a political statement. Countries with potential breakaway regions of their own (like Spain, with its restive regions of Catalonia and the Basque Country) tend not to recognise breakaway entities for fear of legitimising domestic separatist movements. Patterns of recognition and non-recognition of disputed states are also often expressions of international alliance systems. Returning to the case of Kosovo, recognition tends to be granted by NATO and other allies of the United States, whilst it is withheld by Russia and Russian allies.