Method Ruby

string = 'My first string'                   # => "My first string"
string.count 'i'                             # => 2   # "i" occurs twice.
string.count('i')                            # => 2