Fast Matching of Regular Patterns With Synchronizing Counting (Technical Report)