well, i have been trying to solve this whole day so ......
Then you definitely need to work on your bug fixing skills. I assume you haven't used a systematic approach. I suggest you take a debugger, step through the program, compare variable's actual values with your expectations and find out where and why there are differences. If necessary, split the code into smaller parts that you can test on their own and exclude functionality that does not contribute to the error. This way, you can quickly localize where the problem is.
I'm saying this because I think such advice is of much greater value for you than simply saying "in this line there is the error", and next time you have a similar problem, you waste another day.
Also, some general tips that make your code shorter, easier to understand and thus less error-prone: Use
std::unique_ptr instead of raw
new/delete. You have code duplication (3 methods to insert, get object and count have very similar structure), you should extract a function that returns the correct object depending on the position:
QuadTree& getChildAtPosition(sf::Vector2f position);