The hymn would appear to have references to Alevism;
Alevis are the second largest belief community in Turkey. However language, belief and ethnic background is not registered in the national census therefore, it is not possible to have official statistics about the number of Alevis. On the basis of reliable academic research, the population of Alevis is estimated at approximately 20 million out of 70 million population in Turkey.
What is Alevism;
Alevism is not a stagnate belief but has evolved by interacting with various beliefs, spiritual doctrines and cultures over a wide geographical area from Central Asia to Balkan Mountains throughout the history. A process of gradual convergence between various different mystical schools since the 13th century constitutes what we call Alevism today. The concept of Alevi is actually a broad term covers different language and ethnic communities sharing same belief components.
The seven therefore refers to the seven grand poets:
Alevis specifically venerate seven poets as their grand poets who are Seyyid Nesimi (14th century), Yemini (15th century), Pir Sultan Abdal, Virani, Kul Himmet, Hatayi and Fuzuli (16th century).
And the forty to:
Ayn-i Cem (the ritual of gathering) is the main ritual in Alevism. This special ritual is modeled on a mystical event, the Assembly of the Forty Being (Kırklar Cemi), includes 17 women and 23 men. They gather with the motto of “all for one, one for all.” This narrative portrays a sacred and secret gathering which the Prophet Muhammad participated on his way back from Miraç (heavenly journey in which he meets God). Ali, as the leader of this gathering, opens the secrets of belief to Prophet during the ceremony. The notable narrative used by Muhammed was “I am the city of knowledge but Ali is the gate.”
The twelve imams, who were the key that made this all findable online, are another common Alevi belief.
Each Imam represents a different aspect of the Universe and are recognized as twelve services or oniki hizmet which are performed by members of the Alevi community.
There is much more detail obviously on the website linked.