Pandas groupby transform count gives empty dataframe
I was surprised by the behaviour of `groupby transform count`.

Versions:
```
np.__version__, pd.__version__
('1.16.4', '0.24.2')
```

Code:
```python
import numpy as np
import pandas as pd

df = pd.DataFrame({'A': list(range(10))})


b = df.groupby('A').transform('count') # I was expecting all ones.
print(b) # empty dataframe
```

Results:
```
Empty DataFrame
Columns: []
Index: [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]
```

Question:  
Is this the desired behaviour, I was expecting all values to be 1 ?

Also Another Question
====================
Code:
```
df = pd.DataFrame({'A': ['a']*5+['b']*4+list('ccde'),
                   'B': [1]*5  +[2]*4  +[3,3,4,5]})


df['xx'] = df.groupby('A').transform('count')

# df['yy'] = df.groupby('A').transform('count') # when I uncomment this it will fail
df
```

when I uncomment the line with `df['yy']` it will throw an error. Is that the desired behavior?

```
---------------------------------------------------------------------------
KeyError                                  Traceback (most recent call last)
/usr/local/lib/python3.6/dist-packages/pandas/core/indexes/base.py in get_loc(self, key, method, tolerance)
   2656             try:
-> 2657                 return self._engine.get_loc(key)
   2658             except KeyError:

pandas/_libs/index.pyx in pandas._libs.index.IndexEngine.get_loc()

pandas/_libs/index.pyx in pandas._libs.index.IndexEngine.get_loc()

pandas/_libs/hashtable_class_helper.pxi in pandas._libs.hashtable.PyObjectHashTable.get_item()

pandas/_libs/hashtable_class_helper.pxi in pandas._libs.hashtable.PyObjectHashTable.get_item()

KeyError: 'yy'

During handling of the above exception, another exception occurred:

KeyError                                  Traceback (most recent call last)
9 frames
pandas/_libs/index.pyx in pandas._libs.index.IndexEngine.get_loc()

pandas/_libs/index.pyx in pandas._libs.index.IndexEngine.get_loc()

pandas/_libs/hashtable_class_helper.pxi in pandas._libs.hashtable.PyObjectHashTable.get_item()

pandas/_libs/hashtable_class_helper.pxi in pandas._libs.hashtable.PyObjectHashTable.get_item()

KeyError: 'yy'

During handling of the above exception, another exception occurred:

ValueError                                Traceback (most recent call last)
/usr/local/lib/python3.6/dist-packages/pandas/core/internals/blocks.py in __init__(self, values, placement, ndim)
     85             raise ValueError(
     86                 'Wrong number of items passed {val}, placement implies '
---> 87                 '{mgr}'.format(val=len(self.values), mgr=len(self.mgr_locs)))
     88 
     89     def _check_ndim(self, values, ndim):

ValueError: Wrong number of items passed 2, placement implies 1
```