How can i modify Dijkstra algorithm for equal situation?

I have a question below

In Dijkstra’s Algorithm, if there is more than one possible shortest path from u to any vertex v, any one of the paths can be the output of the algorithms as a shortest path. Assume now that if that is the case for any vertex v, i.e.there are many paths of the same minimum weight, you want to find the path with minimum number of edges. If there are stil ties then they can now be broken arbitrarily. Describe how to modify Dijkstra’s Algorithm to solve this problem