Groupby observed=True scrambles the count() values
#### Code Sample, a copy-pastable example if possible

```python
# Your code here
temp = loan.groupby('loan_amnt_bin').filter(lambda grp: grp['id'].count() > 400)
binned_count = temp.groupby('loan_amnt_bin', observed=True, as_index=False).count()
binned_count
```
#### Problem description
Input without observed=True:
temp = loan.groupby('loan_amnt_bin').filter(lambda grp: grp['id'].count() > 400)
binned_count = temp.groupby('loan_amnt_bin', as_index=False).count()
binned_count

Correct output:
![image](https://user-images.githubusercontent.com/47188873/52008098-f2c38c80-24f5-11e9-839f-f53d1567a903.png)

Input wit observed=True:
temp = loan.groupby('loan_amnt_bin').filter(lambda grp: grp['id'].count() > 400)
binned_count = temp.groupby('loan_amnt_bin', observed=True, as_index=False).count()
binned_count

Wrong output:
![image](https://user-images.githubusercontent.com/47188873/52008204-2a323900-24f6-11e9-8308-50268976670e.png)

With observed=True, the unobserved bins were removed, but the categories were not sorted while the counts in id column were as per sorted bins. This basically scrambled the count() output.


#### Expected Output
The unobserved bins should be removed, and the grouped by categorical values should be sorted to match the count() results.

#### Output of ``pd.show_versions()``

<details>

[paste the output of ``pd.show_versions()`` here below this line]
INSTALLED VERSIONS
------------------
commit: None
python: 3.7.1.final.0
python-bits: 64
OS: Windows
OS-release: 7
machine: AMD64
processor: Intel64 Family 6 Model 23 Stepping 10, GenuineIntel
byteorder: little
LC_ALL: None
LANG: None
LOCALE: None.None

pandas: 0.24.0
pytest: 4.0.2
pip: 18.1
setuptools: 40.6.3
Cython: 0.29.2
numpy: 1.15.4
scipy: 1.1.0
pyarrow: None
xarray: None
IPython: 7.2.0
sphinx: 1.8.2
patsy: 0.5.1
dateutil: 2.7.5
pytz: 2018.7
blosc: None
bottleneck: 1.2.1
tables: 3.4.4
numexpr: 2.6.8
feather: None
matplotlib: 3.0.2
openpyxl: 2.5.12
xlrd: 1.2.0
xlwt: 1.3.0
xlsxwriter: 1.1.2
lxml.etree: 4.2.5
bs4: 4.6.3
html5lib: 1.0.1
sqlalchemy: 1.2.15
pymysql: None
psycopg2: None
jinja2: 2.10
s3fs: None
fastparquet: None
pandas_gbq: None
pandas_datareader: None
gcsfs: None
</details>
