From Singularity Theory to Finiteness of Walrasian Equilibria