As many of the people who count the votes are aligned with the opposition it is plausible that numbers would leak, likely via Rafsanjani.
The letter linked? Hard to say. Possibly an attempt to discredit the numbers themselves which may be real, or to pre-empt the release of other numbers. These numbers have gone around a bit but there's also another set of more plausible numbers that showed Mosuavi with around 57% and Ahmedinijad with I believe 37% or around there.