The "filename" should be declared as: char *filename;
Remember, a string in C (often called a C-string) is just an array of chars. If you plan to copy the array, use strcpy(). If you just need to reference the array (as you do here), then use =.
That is because you did not obey my advice and now your code has a dangerous bug (what if the user specifies a filename containing more than 19 characters?).
I don't know why you introduced the "buffer" variable... Unless there is much more to your code than is posted here...
Better, but a few things are still moved around with respect to your first post. Also, something I missed the first time: if (argc < 2)
(Because argc includes the name of the program.)
Move the stuff that opens the file out of the loop. (You have to open the file before you can test for EOF.)
Don't forget to turn sscanf() back into fscanf(). Also, you forgot to increment 'counter' in the loop.