SyntaxFix
Write A Post
Hire A Developer
Questions
If you know you will want all the matches, you could use the re.findall function. It will return a list of all the matches. Then you can just do len(result) for the number of matches.
re.findall
len(result)