Well, how are you retrieving the resulting rows? (HINT: Which function?) I like to use [man]mysql_fetch_assoc/man.
Also, if you're naming the output of MySQL functions in your SELECT column list, I would give them an alias name for easy reference:
SELECT kid, count(action) AS count
FROM visitor_log
GROUP BY kid
Declaring the alias 'count', you should be able to use the code snippet you posted above (assuming, of course, you're using the right MySQL function).