# Count number of string 'appearances'

**URL:** <https://forum.kirupa.com/t/count-number-of-string-appearances/282832>\
**Category:** Uncategorized\
**Created:** [February 26, 2009, 10:09pm UTC](https://forum.kirupa.com/t/count-number-of-string-appearances/282832 "2009-02-26T22:09:33Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![lorren\_biffin](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/lorren_biffin/32/2726_2.png) [@lorren\_biffin](https://forum.kirupa.com/u/lorren_biffin)\
**Post date:** [February 26, 2009, 10:09pm UTC](https://forum.kirupa.com/t/count-number-of-string-appearances/282832/1 "2009-02-26T22:09:33Z")

</div>

For instance, say I have the string “A man is as good as his word”.

What’s the best way to count the number of times the character ‘a’ appears in the string? (Is there a method/function that I’m not remembering?)
