KAPIL BHAGAVAN - MENTIONED IN PURANAS
He is referring to the Samkhya of Kapila Bhagavan, an incarnation of Vishnu who is mentioned in the Bhagavat Purana, who extolled the Yoga of analytics, and a theistic form of mystic yoga meditation that concentrates on the Vishnu roop, instead of Brahman absorption. This account was told in Bhagavatam to teach that the purpose of yoga and mysticism purpose is to please God, as echoed in the beginning chapters of Bhagavatam.
2 DIFFERENT KAPILAS
He is often confused with a philosopher Kapila Muni who created an athiest version of Sankhya philosophy which is known among the 6 interpretations of the Vedas - Sad Darshana
For the propagation of this transcendental knowledge, Kapiladeva, the incarnation of the Supreme Personality of Godhead, gave instructions in Sāṅkhya philosophy to His mother, Devahūti. Later, another Kapiladeva appeared who expounded atheistic Sāṅkhya philosophy, which dealt with the twenty-four elements but gave no information about God. The original Kapila is called the Devahūti-putra Kapila, and the other is called the atheist Kapila. - From Teachings of Lord Kapila
SANKHYA IN 2nd CHAPTER OF GITA
Sankhya mentioned in the context of the 2nd Chapter of Gita, I believe that Sri Krishna is not referring to a particular Sankhya culture or practice here, but Sankhya meaning the analytical method for arriving at the proper conclusion of dharma vs working automatically under a direct order.
Arjuna knew that Krishna was Bhagavan, but his mind filled with doubts about the order of Bhagavan to fight, so Krishna in the beginning of his speech gave him many arguments why fighting would be good from different persepective. Such as, "the body has to die sooner or later, might as well be dying for dharma", to ultimately convincing him that fighting his elders in this case was a path of dharma, and not sin, as its impossible for the soul to actually be killed, and these conclusion originate from ignorance of spiritual science.
So Krishna terms this argumentative logical process of convincing the intelligence and mind Buddhi Yoga, yoga of intelligence, and using Sankhya analystics, by weighing things out, he could make the correct decision.
Later, Krishna says working in Karma Yoga is the same as Sankhya, one process is searching for the root, and the other process of karma yoga is watering the root.