Theory
The theoretical limit to your question is the number of seats within the Parliament. You can find this list here. Although China has the largest number of members; the Legislature is cemented under one party. The European Parliament numbers are skewed because the parties form ideological groups. India is, possibly, the most fragmented legislature in the world.
Thank you to SJuan76 for prompting me about the Middle East. Elections are often marred by multiple parties, multiple 'blocs' and multiple affiliations, denominations and faiths which have protected seats. For instance the Iraq Election of 2014 has arguably 40 'parties' but whether they are defined at political parties in the generally accepted sense is up for discussion. For instance; is the Unity of the Iraqis (Wahdat Abnaa al-Iraq) the party or is that party comprised of the following parties;
- National Alliance of Saladin
- National Coalition in Saladin
- Independent Civil Alternative Coalition
- Dignity Alliance (Karama)
- Al-Sadiqoun Bloc
- The Equitable State Movement
- Ad Dawa Iraq Organization
- Solidarity in Iraq (Al Tadamon) Alliance
- Salvation (Khalas) Alliance
- Arab Kirkuk Alliance
Answer
You are looking for the 2014 election in India. 35 parties with 1 seat or more were elected. 38 if you count the 3 independents as a party each.
About 15,000 candidates from 500 political parties compete for 543 seats in the Lok Sabha, or lower house of Parliament.
You can read a documented account in this article.
Parliamentary elections in India are held every five years, unless the government is dissolved before that. With 1.2 billion people in India, it requires 800,000 polling stations, multiple phases, and a period of weeks to declare the winner.
Detailed Breakdown
According to the Election Commission of India, 814.5 million people were eligible to vote, with an increase of 100 million voters since the last general election in 2009, making it the largest-ever election in the world. Around 23.1 million or 2.7% of the total eligible voters were aged 18–19 years. A total of 8,251 candidates contested for the 543 Lok Sabha seats. The average election turnout over all nine phases was around 66.38%, the highest ever in the history of Indian general elections.
Party List
You can find an abridged table of the parties involved here.