Creating and editing a text file

Basicaly im trying to make it so when the arduino recieves a pulse it edits a text file and puts down a tally mark for every pulse (ex. 11111111 for 8 pulses). So far im going to use Pulsein to count the pulses

I doubt that. You make be using pulseIn to detect the pulse, but you aren't using it to count the pulses.

Why would you want to open a file and see that there was a varying number of ones in it? Wouldn't it be better to open the file and see something like 27 in it, rather than 111111111111111111111111111?