message: Add Dataset::num_chunks()
diff: @@ -8,7 +8,7 @@ use hdf5_sys::{
  h5::HADDR_UNDEF,
  h5d::{
  H5D_fill_value_t, H5D_layout_t, H5Dcreate2, H5Dcreate_anon, H5Dget_create_plist,
  - H5Dget_offset, H5Dset_extent, H5D_FILL_TIME_ALLOC,
  + H5Dget_num_chunks, H5Dget_offset, H5Dset_extent, H5D_FILL_TIME_ALLOC,
  },
  h5p::{
  H5Pcreate, H5Pfill_value_defined, H5Pget_chunk, H5Pget_fill_value, H5Pget_layout,
  @@ -77,6 +77,17 @@ impl Dataset {
  })
  }
  + /// Returns number of chunks if the dataset is chunked.
  + pub fn num_chunks(&self) -> Option<usize> {
  + if !self.is_chunked() {
  + return None;
  + }
  + h5lock!(self.space().map_or(None, |s| {
  + let mut n: hsize_t = 0;
  + h5check(H5Dget_num_chunks(self.id(), s.id(), &mut n)).map(|_| n as _).ok()
  + }))
  + }
  +
  /// Returns the chunk shape if the dataset is chunked.
  pub fn chunks(&self) -> Option<Vec<Ix>> {
  h5lock!({
  