A quick check on U Boat Net gives the figure of 757 U Boats lost. This includes air attacks in harbours, training accidents, accidents at sea and 2 boats interned in neutral countries.
It also threw up an interesting one I've never heard before.
U-31 was sunk twice in 1940, March 11 and November 2.
Man, how unlucky is that?
As Mookiemookie has said, the discrepancy can be accounted for by boats being sunk, but the commander surviving.
EDIT: DISCLAIMER - I am assuming this is the cause of the discrepancy, I haven't actually checked the numbers. I'm sure someone will be along in a minute with the facts
http://uboat.net/fates/losses/chart.htm