add counts and update limit check.

Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>