fgets without the line return
The function does not handle end-of-file correctly. stdin is just a stream, and could be closed like any other stream. For example, type Ctrl-D. Or
  echo -n a | ./a.out
  a????????

Keep in mind that reading beyond end-of-file doesn't set errno.

There is no reason to special-case count == 0.
An IO error doesn't break the loop. If it happened, all the subsequent invocations of fgets would return EOF, and upon the loop termination the count will be n.

Pass the buffer size as size_t. This is what sizeof yields, and the buffers could be large enough for their size to overflow an integer.