On a page https://shakti.com/tutorial/ I've found the solution, it is
#:'z / counts each list
The same solution was mentioned in https://code.kx.com/v2/learn/startingkdb/language/ by switching to k mode in q:
q) #:'(1 2;"abc") / equivalent k expression
2 3
Why this expression #:'
counts the number?
#
counts'
is aneach
Adverb- but what
:
means in this case? This is not an assignment, right?