Is card counting allowed in Dominion?
I think you missed something in the rules:


  A player is allowed to count how many cards are left in his deck, but not in his discard pile. A player may not look through his deck or his discard pile. A player may look through the trash pile, and players may count the number of cards left in any pile in the supply.


(I typed this from my copy of the Intrigue rules; it looks like it says the same thing in the original rules - it's in the Additional Rules section in both.)

So... you can do exactly what those rules say. If you want to do anything else, that's up to you and the people you play with. It seems pretty clear that keeping track of your discard pile on a sheet of paper is equivalent to counting it. Donald X would seem to agree, saying that using a notebook to keep a tally of score is not officially endorsed by the rules. (Thanks to Rob Renaud for providing that link!)