Repository: modin-project/modin

Issue:
`count` doesn't work correctly with `numeric_only==True`
### System information
- **OS Platform and Distribution (e.g., Linux Ubuntu 16.04)**: `Windows 10`
- **Modin version** (`modin.__version__`): `0.8.0+27.g55ec076.dirty`
- **Python version**: `Python 3.7.6`
- **Code we can use to reproduce**:

```python
import pandas
import numpy as np
import modin.pandas as pd

data = {
    "int_col": [1, 2, np.NaN, 4],
    "float_col": [np.NaN, 9.4, 10.1, np.NaN],
    "str_col": ["a", np.NaN, "c", "d"],
    "bool_col": [False, True, np.NaN, np.NaN],
}

modin_df = pd.DataFrame(data)
pandas_df = pandas.DataFrame(data)

print(f"pandas:\n{pandas_df.count(axis=0, numeric_only=True)}")
print(f"modin:\n{modin_df.count(axis=0, numeric_only=True)}")
```

<!--
You can obtain the Modin version with

python -c "import modin; print(modin.__version__)"
-->

### Describe the problem
<!-- Describe the problem clearly here. -->

Different from pandas result.

Pandas result:
```
pandas:
int_col      3
float_col    2
dtype: int64
```

### Source code / logs
<!-- Include any logs or source code that would be helpful to diagnose the problem. If including tracebacks, please include the full traceback. Large logs and files should be attached. Try to provide a reproducible test case that is the bare minimum necessary to generate the problem. -->
Modin exception:
```
  File "test.py", line 19, in <module>
    print(f"modin:\n{modin_df.count(axis=0, numeric_only=True)}")
  File "\modin\pandas\base.py", line 748, in count
    self._validate_dtypes(numeric_only=numeric_only)
  File "\modin\pandas\dataframe.py", line 2766, in _validate_dtypes
    raise TypeError("{0} is not a numeric data type".format(t))
TypeError: object is not a numeric data type

```



Discussion:
When it is fixed, xfail mark need to be removed in `TestDataFrameReduction :: test_count` test.

Resolving patch:
diff --git a/modin/pandas/base.py b/modin/pandas/base.py
--- a/modin/pandas/base.py
+++ b/modin/pandas/base.py
@@ -777,30 +777,39 @@ def copy(self, deep=True):
         return new_obj
 
     def count(self, axis=0, level=None, numeric_only=False):
-        """Get the count of non-null objects in the DataFrame.
+        """
+        Get the count of non-NA cells for each column or row in the DataFrame.
 
-        Arguments:
-            axis: 0 or 'index' for row-wise, 1 or 'columns' for column-wise.
-            level: If the axis is a MultiIndex (hierarchical), count along a
-                particular level, collapsing into a DataFrame.
-            numeric_only: Include only float, int, boolean data
+        Parameters
+        ----------
+            axis : {0 or 'index', 1 or 'columns'}, default 0
+                If 0 or 'index' counts are generated for each column.
+                If 1 or 'columns' counts are generated for each row.
+            level : int or str, optional
+                If the axis is a `MultiIndex` (hierarchical), count along a
+                particular `level`, collapsing into a `DataFrame`.
+                A `str` specifies the level name.
+            numeric_only : bool, default False
+                Include only `float`, `int` or `boolean` data.
 
-        Returns:
-            The count, in a Series (or DataFrame if level is specified).
+        Returns
+        -------
+            Series or DataFrame
+            For each column/row the number of non-NA entries.
+            If `level` is specified returns a `DataFrame`.
         """
         axis = self._get_axis_number(axis)
-        if numeric_only is not None and numeric_only:
-            self._validate_dtypes(numeric_only=numeric_only)
+        frame = self.select_dtypes([np.number, np.bool]) if numeric_only else self
 
         if level is not None:
-            if not self._query_compiler.has_multiindex(axis=axis):
+            if not frame._query_compiler.has_multiindex(axis=axis):
                 # error thrown by pandas
                 raise TypeError("Can only count levels on hierarchical columns.")
 
             return self._handle_level_agg(axis=axis, level=level, op="count", sort=True)
 
-        return self._reduce_dimension(
-            self._query_compiler.count(
+        return frame._reduce_dimension(
+            frame._query_compiler.count(
                 axis=axis, level=level, numeric_only=numeric_only
             )
         )


Test patch:
diff --git a/modin/pandas/test/dataframe/test_reduction.py b/modin/pandas/test/dataframe/test_reduction.py
--- a/modin/pandas/test/dataframe/test_reduction.py
+++ b/modin/pandas/test/dataframe/test_reduction.py
@@ -101,14 +101,7 @@ def test_count(data, axis):
     )
 
 
-@pytest.mark.parametrize(
-    "numeric_only",
-    [
-        pytest.param(True, marks=pytest.mark.xfail(reason="See #1965 for details")),
-        False,
-        None,
-    ],
-)
+@pytest.mark.parametrize("numeric_only", [True, False, None])
 def test_count_specific(numeric_only):
     eval_general(
         *create_test_dfs(test_data_diff_dtype),