Count also now bails out if something gos wrong.