Code says 15" from vanity (IRC P22705.1, number 5). It does not say where to measure from, however the countertop is part of the vanity, and so I would say the intent of the code is to measure from the center of the water closet to the closest part of the vanity. This is likely the opinion of your inspector, and I don't think you will get far contesting his judgement of the intention of the code - but you are always welcome to try.
Also, to hypothetically take your example a little further, what if the countertop protruded further, say 8" from the side of the vanity? Or 18"? When would you stop allowing the overhang of the countertop to be counted separately from the wall of the vanity with regard to the 15" to the center of the toilet rule?
Good luck, I hope you come up with an easy answer to make everything compliant.