python count variable and put the count in a column of data frame
df['freq'] = df.groupby('myvar')['myvar'].transform('count')
Source: stackoverflow.com
pandas count vvariables of each dtype
df.dtypes.value_counts()
Source: stackoverflow.com