Summing the normalized squared differences between your Observed ($O$) and Expected ($E$) categorical counts.
Where $k$ is the number of distinct categories.