Template:StrCount

This counts the number of instances searchstring occurs within the target string. It has one caveat: spaces and underscores (_) are interchangeable. If you need to distinguish between the two, you should not use this template. This was done to preserve spaces. This is a "quick and dirty" method; there are other ways to accomplish this task.