I am solving this problem from SPOJ : https://www.spoj.com/problems/COT/ I referred to the blog by Anudeep. Find it here : https://blog.anudeep2011.com/persistent-segment-trees-explained-with-spoj-problems/
What I don't understand is what the variable "count" stores for each node. Can someone explain what count refers to and how it helps in finding the ordered statistics? Thanks.