How remove tags just have one post?

I found the sql code and It works fine. I just change 0 to 1

DELETE FROM wp_terms WHERE term_id IN (SELECT term_id FROM wp_term_taxonomy WHERE count = 0 );

error code: 523