score:14
There is no resetting of the 90/180 day counter; the rolling 180-day count continues unabated no matter what you do.
It sounds like you got lucky; since there is no Schengen-wide entry/exit database to check automatically, detection of overstays depends on the border guards looking through all of the entry and exit stamps in your passport and doing the calculations on the fly. If there's a busy line and you otherwise look trustworthy, they may have neglected that.
That is no guarantee that you will be lucky again next time, however.
It is strongly recommended that you count up your days yourself before traveling and change your plans if you would get over the limit, rather than waiting to be stopped at the border. You can use the official calculator if you find the rules complex to apply.
Also, if you're doing actual work for months at a time under a short-stay visa, you're probably in violation of national law in the host country unless you've got a work permit. This is independent of visa rules as far as Schengen is concerned, though.