id,node_id,number,title,user,state,locked,assignee,milestone,comments,created_at,updated_at,closed_at,author_association,active_lock_reason,draft,pull_request,body,reactions,performed_via_github_app,state_reason,repo,type 1841227199,I_kwDOAMm_X85tvuW_,8055,Documentation of `Dataset.count()` is ambiguous,90768774,closed,0,,,3,2023-08-08T12:35:59Z,2023-08-09T13:50:56Z,2023-08-09T13:50:56Z,CONTRIBUTOR,,,,"### What is your issue? Hello everyone! I've noticed that the documentation for `Dataset.count` and `DataArray.count` is a little unclear with respect to what it actually does. In my experience, it's not immediately obvious when looking at [this site](https://docs.xarray.dev/en/latest/generated/xarray.DataArray.count.html#xarray.DataArray.count) whether zero values are counted or not. The given example does not contain a 0 value that would clarify this, and what is worse is that the ""see also"" section points to `np.count` and to `dask.array.count` which do not exist. The closest NumPy equivalent is `np.count_nonzero`, which has a different behavior to the xarray `count` method. The xarray count is actually equivalent to Pandas DataFrame.count, which count all non-NA values including 0. I would take a shot at writing a clearer docstring but I'm not sure how to do that using the `generate_aggregations.py` file...","{""url"": ""https://api.github.com/repos/pydata/xarray/issues/8055/reactions"", ""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,completed,13221727,issue