Made Ando_Regex::count_captures and ::count_groups temporarily public for testing.
Added a couple of tests, and found out ::count_captures had a bug, now fixed.
Added links to my article about counting capturing groups.
Removed Ando_Regex::count_captures.
Renamed Ando_Regex::count_groups as ::count_captures.
Added a couple of assertions in a a test for Ando_Regex::count_captures.
Added a TODO to Ando_Regex::count_captures because I need to fix a misunderstanding.
Added many TODOs for improving the currently very limited support for backreferences and other relevant stuff.
Renamed Ando_Regex::count_captures as ::count_matches.
Rewritten Ando_Regex::count_matches and its usages to fix a misunderstanding. The problem was that numbered and named groups were counted separately but added up in the end. It was a problem because for the count for backreferences only the numbered groups are significant. And also for the count of duplicate numbers only the numbered groups are significant.
Added a couple of assertions in a test for Ando_Regex::count_matches.
Many more tests needed.
Moved all TODOs at the top. Next I'll open issues for each.
Fixed: Initialized captures_in_variables per interpolation rather than globally.