pep8 for api.py
add start count for get_messages