All I want to do is to get the result of

select count(*) from messages

in every second, instead of keep typing such query.

Thanks.