Measuring Frequency on Arduino Mega 2560

This was very difficult to find.

To do this you need to download the library at … http://www.pjrc.com/teensy/td_libs_FreqCount.html

Pin 47 is used to measure the frequency on the 2560 mega and cannot be changed. Here is sample code that will work with the arduino.

/* FreqCount - Example with serial output
* NEED TO USE D IO PIN 47 FOR FREQUENCY INPUT FOR 2560 MEGA!!!!!!!!
 * http://www.pjrc.com/teensy/td_libs_FreqCount.html
 *
 * This example code is in the public domain.
 */
#include <FreqCount.h>

void setup() {  
  Serial.begin(9600);
  FreqCount.begin(1000);
}

void loop() {
  if (FreqCount.available()) {
    unsigned long count = FreqCount.read();
    Serial.println(count);
  }
  
   }

can i change the pin number . I am using tft screen therefore 47 pin is used by my tft.