How many times does a character occur?

Write a function that takes two strings (a and b) as arguments. Return the number of times a occurs in b.
JavaScript
Console