In your function 'replaceString' "int count1;" is not initialized. You should assign 0 or any other number to it before you start using it ("while (source[count1] != '\0')").
Don't you want to use the debugger as I suggested to make your life easier?
Also, posting the input and corresponding output of your program is always helpful! You should always compile your program with all compiler warnings on (e.g. '-Wall' - use google to find even more to support you). Warnings given to you by the compiler should be treated seriously! With the right settings the compiler would have told you that you missed initializing the variable