graphs – Issue regarding time complexity of Dijkstra’s Algorithm

So I tried writing Dijkstra’s Algorithm for the following graph. I used Priority Queue so time complexity could be less than V^2 ( where ‘V’ is the total number of vertices)

enter image description here

My approach ->

public static class Pair implements Comparator<Pair> {
        int vertex;
        int weight;

        Pair(){}

        Pair(int vertex,int weight){
            this.vertex=vertex;
            this.weight=weight;
        }

        @Override
        public int compare(Pair pairOne, Pair pairTwo) {
            return Integer.compare(pairOne.weight,pairTwo.weight);
        }
    }

public static void shortestPath(ArrayList<ArrayList<Pair>> adjList,int vertices,int source){
        int count=0;
        int() distance=new int(vertices);
        boolean() spt=new boolean(vertices);
        for(int i=0;i<vertices;i++){
            distance(i)=Integer.MAX_VALUE;
        }
        distance(source)=0;
        spt(source)=true;
        PriorityQueue<Pair> ourPriorityQueue=new PriorityQueue<>(vertices,new Pair());
        ourPriorityQueue.add(new Pair(source,distance(source)));

        while(!ourPriorityQueue.isEmpty()){
            Pair poppedElement=ourPriorityQueue.poll();
            spt(poppedElement.vertex)=true;
            count++;
            for(Pair pair:adjList.get(poppedElement.vertex)){
                if(!spt(pair.vertex) && distance(pair.vertex)>distance(poppedElement.vertex)+pair.weight){
                    distance(pair.vertex)=distance(poppedElement.vertex)+pair.weight;
                    ourPriorityQueue.add(new Pair(pair.vertex,distance(pair.vertex)));
                }
            }
        }
        for(int i=0;i<vertices;i++){
            System.out.println("Distance of " + i + " from source is " + distance(i));
        }
        System.out.println(count);
    }

The one doubt I encountered was that my outer loop is running more than ‘V’ times as same vertices with different weights are being added more than once in the priority queue. Since the outer loop is running more than ‘V’ times. will the time complexity not become more than O(VLogV) ? Printing The count variable proves that the loop is running more than ‘V’ times