Update str_replace.js

The formula used to get the count value is incorrect.
The correct count is obtained by appending the matches found when calling split minus 1
(split.length -1).