I don't know the answer.
But here's a potential candidate.
Unlike the aforementioned films that involved digital cloning of one character (Clone Wars, The Matrix, Charlie and the Chocolate Factory), Buster Keaton physically acted out (from my count) 27 separate roles in his 1921 film
The Play House
movies.stackexchange.com/users/756/DA.
In Bollywood film What's Your Raashee? , Priyanka Chopra plays 12 characters, depicting the signs of the zodiac.
Individual role played by the actress with there zodiac sighs are as below :
All twelve character have different characteristic then the rest, few also address social issues of India too and get sufficient scene time in the film, making it 211 minutes after the cuts and got criticized for length.
The actress was considered for Guinness World Records as the first actress to play 12 different characters in one film.
Film was a flop but actress got lot of praise.
Another film from India, Dasavathaaram also is bit close with 10 roles played by same character.
movies.stackexchange.com/users/1190/Ankit Sharma
Deep Roy played all 165 Oompa Loompas in the hit film Charlie and the Chocolate factory.
Temuera Morrison was the basis for the clones seen in this scene from "Attack of the Clones".
I count approximately 5000 versions of him, albeit some in helmets.
Hugo Weaving was a lot of Smith.
An awful lot of Smith.
movies.stackexchange.com/users/None/
Kind Hearts and Coronets is a full length film where Alec Guinness plays eight members of the D'Ascoyne family:
Ethelred "the Duke", Lord Ascoyne "the Banker", Reverend Lord Henry "the Parson", General Lord Rufus "the General", Admiral Lord Horatio "the Admiral", Young Ascoyne, Young Henry and Lady Agatha D'Ascoyne.
He also plays the seventh duke in brief flashback sequences to Mama's youth.
movies.stackexchange.com/users/30280/Jimmery
From the 2013 Chilean comedy film " El Ciudadano Kramer " ("Citizen Kramer"), 24 roles for a single actor : Stefan Kramer as himself, and "Alturo Longton" (Arturo Longton) "Moreno Piñera" (Miguel "Negro" Piñera - brother of the President) "Hablo Zalaquett" (Pablo Zalaquett
) "Don Tatán" (Sebastián Piñera, President of Chile at the time) Rodrigo Hinzpeter Iván Fuentes Carlos Larraín (Senator) Camilo Escalona (Senator) Marco Enríquez-Ominami (Presidential candidate) José Antonio Gómez Fernando Paulsen Matías del Río Michelle Bachelet (Presidential candidate in 2013, actual President) Evelyn Matthei (Senator) Franco Parisi (Presidential candidate) Rafael Araneda (TV presenter) Kike Morandé (TV presenter) Diana Bolocco (TV presenter) Mario Kreutzberger (TV presenter, aka "Don Francisco")
Amaro Gómez-Pablos Martín Cárcamo (TV presenter) Karen Doggenweiler (TV presenter, wife of #9) Leonardo Farkas (Proposed presidential candidate)
movies.stackexchange.com/users/31560/x86tux
Does the "Malkovich Malkovich" scene from Being John Malkovich count?
It's difficult to count precisely how many Malkoviches are in this scene; I counted 45 while going through shot-by-shot, but I may have missed a few and/or double-counted some.
These are obviously not named roles, so it may not count for what you're looking for.
Beyond this, Malkovich also plays three "characters" for substantial periods of time in the movie: Himself; Craig inhabiting his body; and Lester and his friends inhabiting his body, towards the end of the movie.
Several other characters "enter" John Malkovich during the movie, but they are not shown having control over Malkovich (just being spectators.)
movies.stackexchange.com/users/30354/Michael Seifert
Along the same lines as Michael Seifert's answer , I nominate John Simm in the Doctor Who episode
The End of Time, Part 1 and The End of Time, Part 2 , in which he appeared as every human on Earth , a total of more than six billion different roles .
movies.stackexchange.com/users/27759/Rand al'Thor
Johnson George played 45 roles in a Malayalam film named Aaranu Njan
(Film name means Who am I?).
He currently holds the Guinness world record for playing most characters in a single movie .
He played roles like Mahatma Gandhi, Swami Vivekananda, Leonardo da Vinci, APJ Abdul Kalam in the movie.
Below is a movie poster showing different characters played by the actor.
movies.stackexchange.com/users/48608/Nog Shine
In the movies Split and Glass, the actor James McAvoy plays a shizophrenic character, who manifests in up to 24 characters (7 of which are shown in Split and 9 in Glass).
movies.stackexchange.com/users/69787/BestGuess
What is the most distinct roles played by the same actor within a single movie?
The most roles played by the same actor in a movie?
movies.stackexchange.com
<acting>
movies.stackexchange.com/questions/49204
movies.stackexchange.com/users/24301/eYe
Johnson George  played  45 roles  in a Malayalam film named  Aaranu Njan. He currently holds the  Guinness world record for playing most characters in a single movie .   Next comes Buster Keaton who physically acted out  27 separate roles  in his 1921 film. Many other actors in both western and Bollywood films have played multiple roles, however, many of them are computer enhanced, using digital cloning. There are a lot of actors that have played many separate roles in various films.                                                                 
Buster Keaton, Priyanka Chopra, Alec Guinness, Deep Roy, John Simm,John Simm, Alec Guinness,  Amaro Gómez-Pablos, Martín Cárcamo and Michelle Bachelet, Stefan Kramer, Johnson George  physically acted out many separate roles in various films.                                                                 