To sell the skin before you have caught the bear. To count of your chickens before they are hatched. In the South Sea mania (1720), dealing in bear-skins was a great stock-jobbing item, and thousands of skins were sold as mere time bargains. Shakespeare alludes to a similar practice:
The man that once did sell the lion's skin While the beast lived, was killed with hunting him.
Henry V., iv. 3.
Source: Dictionary of Phrase and Fable, E. Cobham Brewer, 1894
More on Skin from Infoplease: