Write a C++ program to create a doubly linked list and support the following operation:
i). Insertion at the rear end
ii). Insertion at the specific position
iii). Traversing the entire list and displaying the nodes.
iv). Counting the occurrence of duplicate nodes