I have a question regarding reference count of an object. How i'll be able to know that how many pointers are pointing to my object.....
If you are talking about raw pointers, there is no way to know that. You cnad use standard library faculties, like shared_ptr, which provides use_count() method
A * ptr1 = &obj;
A * ptr2 = &obj;
A * ptr3 = &obj;
now how i'll be able to know that my object obj is referenced by three pointers.