You are Righ !! The sensex comprises of 30 companies.
There are various parameters for selection of company to include in Sensex or say any Index. Generally, the companies from various dispersed industries are considered for inclusion in Index. Further, the leaders in that particular industry are considered for inclusion in Sensex.