Clicking on "Debug" "FINE" in chat with the bot I see the following,
2018-06-10 08:57:46.931 - FINE -- Language:PATTERN MATCH - <202528 Pattern("[can do what when where how does who would could is] *") a:3,c:0,p> - <110 know a:2,c:3,p>
So your issue is you have another pattern that is taking precedence.
You can remove this pattern, add a new pattern, or change the precedence of your other pattern using _ instead of * (the _ wildcard takes precedence in AIML)
i.e.
<pattern>_ to count</pattern>
or,
<pattern>[can do what when where how does who would could is] * to count</pattern>
Or change the script to use Self, as Self lets you control the pattern order.