cattledog:
That code is using the ICP(input capture) pin. ICP5 is on D48.The OP claims that he only has the external clock source pin(T5) on D47 available.
Right, only ICP4 on pin D49. But since OP didn't noticed, it means he did not read anything in the code, except first comments line.
For average person it would not take much time to change registers names Timer4 to Timer5. Think of it like stupidity test, and sadly, OP failed. No offence meant.