According to Sankhya, the Atman is Purusa and is the basis of all, though, at the same time detached from everything. In its view Maya which keeps everything going is Prakriti. The cosmos is contained in 24 "tattvas" ["thatnesses" or principles or categories] of which Prakrti is one- Prakrti is indeed the first of these and it has the name of"pradhana". From it arises the second tattva of "mahat" which is the intellect of Prakrti (like the intellect of man). From mahat(the great) is derived the third tattva of "ahamkara", the ego, self-consciousness, the feeling that there is a separate entity called "I".
Ahamkara divides itself into two: first as the sentient and knowing life of a man, his mind, his five jnanendriyas and five karmendriyas. The second is constituted by the five "tanmatras" and the five "mahabhutas " of the insentient cosmos. The jnanendriyas are faculties with which a man gets to know outside objects: the eyes that see objects, the nose that smells, the mouth that tastes, the ear that hears and the skin that feels by touch. With his karmendriyas he performs various actions. The mouth serves as a karmendriya also since it performs the function of speech. The hand, the leg, the anus and the genitals are all karmendriyas. The "asrayas" for jnanendriyas are sound (ear), feeling, sparsa (skin), form (eye), flavour or taste (mouth), smell (nose). These five are tanmatras. The tattvas in their expanded insentient forms are space (sound), air (feeling or touch), water (flavour), earth (smell), fire (form)- these are mahabhutas. Thus Prakrti, mahat, ahamkara, mind, the five jnanendriyas, the five karmendriyas, the five tanmatras, the five mahabhutas- all these make up the 24 tattvas.
These tattvas are accepted by non-dualistic Vedanta also. According to it, it is Isvara (the Brahman with attributes) who unites Purusa (or the Atman without attributes) with Prakrti or Maya. Sankhya, however, is silent on Isvara.
The three qualities of sattva, rajas and tamas, according to the Sankhya philosophy, are accepted by all Vedantic systems including non-dualism. Sattva denotes a high state of goodness, clarity and serenity; rajas is all speed and action and passion; and tamas denotes sleep, inertia, sloth. The Gita has much to say on the subject in its "Gunatraya-vibhaga yoga". The Lord says: "Nistraigunyo Bhava" (Go beyond all three gunas and dwell in the Atman). Sankhya also believes that all undesirable developments are due to an imbalance of the gunas and that they must be maintained evenly. But, unlike the Gita, Sankhya does not tell us the means to achieve this- like worship of Isvara, surrender to him, Atmic inquiry and so on.
Purusa alone has life, Prakrti is inert. By itself Prakrti is incapable of performing any function. It manifests itself as the 24 tattvas only in the presence of Purusa. But Sankhya also speaks contradictorily that Purusa is "kevala-gnana-swarupin" unrelated to Prakrti. "Kevala" means what is by itself, isolated, without the admixture of anything else. "Kaivalya" is the name Sankhya gives to liberation. The state in which an individual, after discarding the 24 tattvas and being released from inertia, remains in the vital Purusa by himself is "kaivalya". (In Tamil "kevalam" has somehow come to mean "inferior" or "unworthy". )
Advaita also has the goal of one being absorbed in Purusa, that is the Atman, and discarding all else as Maya. To attain this state, the Acarya has cut out a path for us, the path that takes us to final release through works, devotion and philosophic inquiry. Sankhya does no such thing. Most of its teaching relates to forsaking the 24 tattvas.
Another unsatisfactory aspect of Sankhya is this. Purusa (the Atman) is jnana by itself and has no function. Prakrti has a function but is insentient and without jnana. How does this insentient Prakriti unfold itself as the 24 tattvas? According to Sankhya, this phenomenon occurs in the presence of Purusa. This is not a convincing explanation. How does Prakrti perform its function under Purusa that has no function? Supporters of Sankhya answer: "Are not iron filings brought into motion by the presence of a magnet? Does the magnet consciously want to keep them in motion? The magnet is by itself and the iron filings are in motion. Similarly, though Purusa is by himself, Prakrti is activated as a consequence of its vitality. "
Purusa and Prkrti work together like a cripple carried by a blind man. The cripple cannot walk and the blind man cannot see. So the cripple perched on the shoulders of the blind man shows the way and the latter follows his directions. Similarly, Prakrti which has no jnana carries Purusa who is full of jnana, but Prkrti without jnana is behind all affairs of the world. This may sound good as a story or a metaphor but it does not make sense unlike the explanation provided by the Advaita concept- that the Nirguna-Brahman becomes Saguna-Brahman (Isvara) to conduct the world.
Another important difference between Advaita and Sankhya is this. Although Sankhya believes in a Purusa made up of jnana it does not state unequivocally like Advaita that all souls are the same as Purusa. All individual souls, according to Sankhya, exist by themselves. Though the ideas of Sankhya are confusing sometimes, it is regarded as one of our basic systems of philosophy. ("Sankhya " means enumerating, numbers: from it comes Sankhya. )
The author of Sankhya Sutra is Kapila Maharishi. Notable works of this system are Isvarakrsna's Sankhya karika and Vijnanabhiksu's commentary on the Sankhya-sutra.
The Gita too deals with Sankhya. When Bhagavan Krsna speaks of the two paths, Sankhya and Yoga, He means jnana by the former and karmayoga by the latter (not Rajayoga. )
Sankhya does not go beyond asking us to have an awareness of Purusa separate from Prakrti. Rajayoga, however, goes further from this point and tells us the practical means, the "sadhana", to be followed to become aware of Purusa dissociated from Prakrti. The concept of Isvara and devotion to him is part of yoga and it has lessons to bring the mind under control. What generally goes under the name of yoga is Patanjali's Rajayoga, according to which yoga is the stopping the mental process (or the oscillating vitality of consciousness). It is this yoga that has become popular in Western countries.
Sankhya and yoga are not included in caturdasa-vidya but, all the same, they are important among our sastras.
Though devotion to Isvara is not part of Mimamsa, it accepts the authority of the Vedas. Likewise Sankhya too respects the authority of the Vedas and does not support belief in Isvara.
Buddhism on the one hand, Nyaya and Mimamsa on the other which were opposed to it, and Sankhya, which does not accept Isvara but respects the pramanas of the Vedas: of these our Acarya accepts elements that are to be accepted and rejects elements that are to be rejected. He establishes the Vedantic system which harbours all these and which is their source. Sankara's view is not at variance with the ultimate message of Buddhism, that is the exalted state of jnana. He accepts some of the basic concepts of Sankhya like Purusa that is jnana by itself and equivalent to the Nirguna-Brahman and Prakrti which is the same as Maya. At the same time, he accepts the Vedic rituals of Mimamsa and the Isvara of Nyaya. But he sees each of them as an aspect of the one Truth, not as the final goal which it is to the various individual systems mentioned. He integrates these different aspects into a harmonious whole in his own system of thought.
For a general background, please see here