Prime Minister Narendra Modi’s party was set for a historic victory as India on Thursday counted hundreds of millions of votes from its general election.