With car off, connect the two black plugs together (located under/behind steering wheel column), switch ignition to ON, count the flashing CHECK ENGINE light flashes. Long flashes are 10's and quick flashes are 1's ...
So: Flaaaaash Flaaaaaash flash flash flash flash is 24
Here is a how-to with pictures with thanks to Rossco
http://www.perth-wrx.com/vb/stock-ec...unit-only.html