You're opening a file, then passing the file pointer to a function that only wants a file name to open the file itself. You can simplify your call to;
void main(void)
{
printf("LINES: %d\n",countlines("Test.txt"));
}
EDIT: You're changing the question around so it's very hard to answer; at first you got your change to main()
wrong, you forgot that the first parameter is argc, so it crashed. Now you have the problem of;
if (fp == NULL); // <-- note the extra semicolon that is the only thing
// that runs conditionally on the if
return 0; // Always runs and returns 0
which will always return 0. Remove that extra semicolon, and you should get a reasonable count.