Computers are not humans. They don't have feelings or emotions. They don't "want".
Most of the time when something "doesn't work", the first entity you should look to blame is yourself. Why is it hit and miss? Possibly because you're not doing something properly.
Here are my guesses, based on the extremely minimal details you've provided (besides the obvious "it doesn't work"-- you wouldn't be here if it did):
1. The file "quits.txt" is not in your $mircdir. That's where $read() searches in if you don't give it a path. Typing //echo -a $exists(quits.txt) will tell you if it does. Type //run $mircdir and look inside that directory for the quits.txt file. If it's not there, that's why.
2. The server you're on doesn't list quit messages. If you're using a round-robin server on a network, you might be getting a server that supports them one day, and a server that does not another. Freenode, for instance, does not list quit messages. EFNet also has some servers that don't, but again, it depends on the server. Some do, some don't. In this case, you've done nothing wrong, this is just how IRC works.
3. The top of your quits.txt is a number. Don't put numbers at the top of text files, mIRC thinks they are line counts. If you DO have a number at the top of a file, use the t switch in $read() like so: $read(quits.txt,t)
4. The line you're trying to read has a "$" in it, possibly prefixing an invalid identifier name. "$5.00", for instance will cause mIRC to error if you have identifier warnings on. You should be using the "n" switch with $read() unless you specifically want to evaluate the text inside your quits.txt file. $read(quits.txt,tn) is the way to go (the t is from point 3).
My guess is it's 1 or 2, though. 1 if it always happens, 2 if it only happens sometimes.