Euler–Poincaré characteristic and phase transition in the Potts model on