[leap] simpler function to get number of leap seconds