Sometimes a pattern will ask you to work until your piece measures a certain length; others may ask you to work a certain number of rows. Unless your stitch pattern shows very clearly how many rows you've done, it can be handy to have some way of keeping track.
The low tech way is to make a mark on a piece of paper every time you reach the end of a row. Only for desperate times, this one, since it means you have to carry the piece of paper and a pen around with you everywhere.
You can buy little plastic cylindrical row counters with turny-roundy things that let you count up to 99 rows. They will slip onto the ends of your knitting needles to stop you losing them.
A fun suggestion posted on the Ample Knitters mailing list was to put chocolate chips in a dish and eat one per row - so if you have 18 rows to do, put 18 chocolate chips in, and when they're all gone you've finished your knitting. Unless you cheated.