Write your implementation of Ruby's String#count method
If you can use some ruby String method I would suggest
def custom_count(string, search_char)
  search_char.split(&quot;&quot;).inject(0) do |count,pattern|
    string.scan(pattern).size + count
  end
end