add counter.py
add check for length of app_id