Searching our own Python snippet section there are several hits under 'wordcount' and word frequency. These snippets are probably more complex than what you need, so here is a very simple way to do it ...
# Chinese wisdom ...
str1 = """Man who run in front of car, get tired.
Man who run behind car, get exhausted."""
print str1.count('Man') # 2
BTW, Google result --> about 1,110,000 for python word count . That should keep you busy for the next ten years.
For Each ctrl As Control In Me.Controls("pnlMainPanel").Controls
If ctrl.GetType Is GetType(System.Windows.Forms.Panel) Then
For Each subCtrl As Control In ctrl.Controls
If subCtrl.GetType Is GetType(System.Windows.Forms.TextBox) Then
If subCtrl.GetType Is ...