Which elements tend to form the most phases?
Much empirical data is needed to either produce or validate phase diagrams.  Any phase diagram would likely need to be of practical consequence to justify spending the energy and resources to produce it.

An example of a binary mixture with practical consequence would be a metal oxide formed during corrosion. The many forms of iron and oxide are well studied since iron is commonly used to construct tools.

In 2015 a group claimed to use the computer code CALYPSO (Crystal structure AnaLYsis by Particle Swarm Optimization) to discover a new phase of beryllium.  Beryllium is used in aerospace and the construction of nuclear reactors, so the expenditure of effort was justifiable. 

So to answer the  sub-questions:

Is this a function of only one or both of the elements involved?
Practically .. No. In the case of iron oxide in an aqueous solution, multiple iron oxide phases can form at the same temperature and pressure if the pH of the solution or the redox potential value of the solution were changed.   

Has this tendency to form more phases (or less) been quantified for the various elements?  - Yes, phases of practical consequence have been quantified at great effort; however, discoveries of new phases are likely to continue.  

It is possible to estimate the existence of new phases using computer algorithms; however, these phases must be experimentally validated.  A computer algorithm could be constructed around pseudomorphs; however, if a new phase were discovered it would need practical validation by experimentation. 

"Which elements form the most phases?" is an impossible question to give and absolute answer as we are limited to certain pressures and temperatures with which to experiment. The way experimentation is done is likely to bias any verifiable answer toward more practical materials.