Count attributes in same column

for reference, this was solved here Count string item in same column