Messages rebuild

Change some public messages logic, add count method for private messages